summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2006-09-18 09:19:06 (GMT)
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-09-25 09:25:30 (GMT)
commit50dedf168c1afd23cbc6c4fd8429c9e931b4e813 (patch)
treef2c184606f5ee0d8efe108cf5732b19ab8976d10
parent0033a2f0d028400ad04588efbd5740c73f0eb740 (diff)
downloadlinux-50dedf168c1afd23cbc6c4fd8429c9e931b4e813.tar.xz
[ARM] 3806/2: S3C2412: Fix GPIO VA when only S3C2412 selected
The s3c24xx_va_gpio2 variable is only used when the S3C2412 and another cpu-type is being used in the kernel. This patch ensures it is not set when it is not being used. Fixes bug report by Thomas Gleixner. Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/mach-s3c2410/s3c2412.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-s3c2410/s3c2412.c b/arch/arm/mach-s3c2410/s3c2412.c
index 2d163f7..a5ec56e 100644
--- a/arch/arm/mach-s3c2410/s3c2412.c
+++ b/arch/arm/mach-s3c2410/s3c2412.c
@@ -56,6 +56,13 @@
#ifndef CONFIG_CPU_S3C2412_ONLY
void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO;
+
+static inline void s3c2412_init_gpio2(void)
+{
+ s3c24xx_va_gpio2 = S3C24XX_VA_GPIO + 0x10;
+}
+#else
+#define s3c2412_init_gpio2() do { } while(0)
#endif
/* Initial IO mappings */
@@ -110,7 +117,7 @@ void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size)
{
/* move base of IO */
- s3c24xx_va_gpio2 = S3C24XX_VA_GPIO + 0x10;
+ s3c2412_init_gpio2();
/* set our idle function */