Commit 50dedf16 authored by Ben Dooks's avatar Ben Dooks Committed by Russell King

[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: default avatarBen Dooks <ben-linux@fluff.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 0033a2f0
...@@ -56,6 +56,13 @@ ...@@ -56,6 +56,13 @@
#ifndef CONFIG_CPU_S3C2412_ONLY #ifndef CONFIG_CPU_S3C2412_ONLY
void __iomem *s3c24xx_va_gpio2 = S3C24XX_VA_GPIO; 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 #endif
/* Initial IO mappings */ /* Initial IO mappings */
...@@ -110,7 +117,7 @@ void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size) ...@@ -110,7 +117,7 @@ void __init s3c2412_map_io(struct map_desc *mach_desc, int mach_size)
{ {
/* move base of IO */ /* move base of IO */
s3c24xx_va_gpio2 = S3C24XX_VA_GPIO + 0x10; s3c2412_init_gpio2();
/* set our idle function */ /* set our idle function */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment