summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp
diff options
context:
space:
mode:
authorEric Miao <eric.y.miao@gmail.com>2010-03-22 09:39:58 +0800
committerEric Miao <eric.y.miao@gmail.com>2010-03-22 12:03:05 +0800
commit7471f46d74e0e2a668f4bc085ef486b1079b3466 (patch)
tree3131bf56095c801ab97fe227e19645dc7f77d5ec /arch/arm/mach-mmp
parent2a8ac187e03027a958b289dd8701ca9c013ab096 (diff)
downloadlinux-7471f46d74e0e2a668f4bc085ef486b1079b3466.tar.bz2
[ARM] mmp: fix for variables in uncompress.h being discarded
Due to commit: 5de813b ARM: Eliminate decompressor -Dstatic= PIC hack The data section will be discarded for the decompressor, thus move the static variables into BSS section by initializing them at run time. Reported-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r--arch/arm/mach-mmp/include/mach/uncompress.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/arm/mach-mmp/include/mach/uncompress.h b/arch/arm/mach-mmp/include/mach/uncompress.h
index a7dcc5307216..85bd8a2d84b5 100644
--- a/arch/arm/mach-mmp/include/mach/uncompress.h
+++ b/arch/arm/mach-mmp/include/mach/uncompress.h
@@ -14,7 +14,7 @@
#define UART2_BASE (APB_PHYS_BASE + 0x17000)
#define UART3_BASE (APB_PHYS_BASE + 0x18000)
-static volatile unsigned long *UART = (unsigned long *)UART2_BASE;
+static volatile unsigned long *UART;
static inline void putc(char c)
{
@@ -37,6 +37,9 @@ static inline void flush(void)
static inline void arch_decomp_setup(void)
{
+ /* default to UART2 */
+ UART = (unsigned long *)UART2_BASE;
+
if (machine_is_avengers_lite())
UART = (unsigned long *)UART3_BASE;
}