diff options
Diffstat (limited to 'arch/arm/mach-ep93xx/include/mach/uncompress.h')
| -rw-r--r-- | arch/arm/mach-ep93xx/include/mach/uncompress.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/arch/arm/mach-ep93xx/include/mach/uncompress.h b/arch/arm/mach-ep93xx/include/mach/uncompress.h index 1fd2f17de325..16026c2b1c8c 100644 --- a/arch/arm/mach-ep93xx/include/mach/uncompress.h +++ b/arch/arm/mach-ep93xx/include/mach/uncompress.h | |||
| @@ -31,10 +31,19 @@ static void __raw_writel(unsigned int value, unsigned int ptr) | |||
| 31 | *((volatile unsigned int *)ptr) = value; | 31 | *((volatile unsigned int *)ptr) = value; |
| 32 | } | 32 | } |
| 33 | 33 | ||
| 34 | 34 | #if defined(CONFIG_EP93XX_EARLY_UART1) | |
| 35 | #define PHYS_UART1_DATA 0x808c0000 | 35 | #define UART_BASE EP93XX_UART1_PHYS_BASE |
| 36 | #define PHYS_UART1_FLAG 0x808c0018 | 36 | #elif defined(CONFIG_EP93XX_EARLY_UART2) |
| 37 | #define UART1_FLAG_TXFF 0x20 | 37 | #define UART_BASE EP93XX_UART2_PHYS_BASE |
| 38 | #elif defined(CONFIG_EP93XX_EARLY_UART3) | ||
| 39 | #define UART_BASE EP93XX_UART3_PHYS_BASE | ||
| 40 | #else | ||
| 41 | #define UART_BASE EP93XX_UART1_PHYS_BASE | ||
| 42 | #endif | ||
| 43 | |||
| 44 | #define PHYS_UART_DATA (UART_BASE + 0x00) | ||
| 45 | #define PHYS_UART_FLAG (UART_BASE + 0x18) | ||
| 46 | #define UART_FLAG_TXFF 0x20 | ||
| 38 | 47 | ||
| 39 | static inline void putc(int c) | 48 | static inline void putc(int c) |
| 40 | { | 49 | { |
| @@ -42,11 +51,11 @@ static inline void putc(int c) | |||
| 42 | 51 | ||
| 43 | for (i = 0; i < 1000; i++) { | 52 | for (i = 0; i < 1000; i++) { |
| 44 | /* Transmit fifo not full? */ | 53 | /* Transmit fifo not full? */ |
| 45 | if (!(__raw_readb(PHYS_UART1_FLAG) & UART1_FLAG_TXFF)) | 54 | if (!(__raw_readb(PHYS_UART_FLAG) & UART_FLAG_TXFF)) |
| 46 | break; | 55 | break; |
| 47 | } | 56 | } |
| 48 | 57 | ||
| 49 | __raw_writeb(c, PHYS_UART1_DATA); | 58 | __raw_writeb(c, PHYS_UART_DATA); |
| 50 | } | 59 | } |
| 51 | 60 | ||
| 52 | static inline void flush(void) | 61 | static inline void flush(void) |
