Skip to content

Commit

Permalink
[ARM] mmp: fix for variables in uncompress.h being discarded
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Miao committed Mar 22, 2010
1 parent 2a8ac18 commit 7471f46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/arm/mach-mmp/include/mach/uncompress.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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;
}
Expand Down

0 comments on commit 7471f46

Please sign in to comment.