diff options
Diffstat (limited to 'arch/arm/mach-mmp/include/mach/uncompress.h')
-rw-r--r-- | arch/arm/mach-mmp/include/mach/uncompress.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/arm/mach-mmp/include/mach/uncompress.h b/arch/arm/mach-mmp/include/mach/uncompress.h index c93d5fa5865c..85bd8a2d84b5 100644 --- a/arch/arm/mach-mmp/include/mach/uncompress.h +++ b/arch/arm/mach-mmp/include/mach/uncompress.h @@ -8,15 +8,16 @@ #include <linux/serial_reg.h> #include <mach/addr-map.h> +#include <asm/mach-types.h> #define UART1_BASE (APB_PHYS_BASE + 0x36000) #define UART2_BASE (APB_PHYS_BASE + 0x17000) #define UART3_BASE (APB_PHYS_BASE + 0x18000) +static volatile unsigned long *UART; + static inline void putc(char c) { - volatile unsigned long *UART = (unsigned long *)UART2_BASE; - /* UART enabled? */ if (!(UART[UART_IER] & UART_IER_UUE)) return; @@ -34,8 +35,17 @@ 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; +} + /* * nothing to do */ -#define arch_decomp_setup() + #define arch_decomp_wdog() |