diff options
Diffstat (limited to 'arch/arm')
| -rw-r--r-- | arch/arm/mach-ep93xx/Kconfig | 14 | ||||
| -rw-r--r-- | arch/arm/mach-ep93xx/include/mach/uncompress.h | 21 |
2 files changed, 29 insertions, 6 deletions
diff --git a/arch/arm/mach-ep93xx/Kconfig b/arch/arm/mach-ep93xx/Kconfig index ea8549bfbef2..5a1b8c05c958 100644 --- a/arch/arm/mach-ep93xx/Kconfig +++ b/arch/arm/mach-ep93xx/Kconfig | |||
| @@ -88,6 +88,20 @@ config MACH_TS72XX | |||
| 88 | Say 'Y' here if you want your kernel to support the | 88 | Say 'Y' here if you want your kernel to support the |
| 89 | Technologic Systems TS-72xx board. | 89 | Technologic Systems TS-72xx board. |
| 90 | 90 | ||
| 91 | choice | ||
| 92 | prompt "Select a UART for early kernel messages" | ||
| 93 | |||
| 94 | config EP93XX_EARLY_UART1 | ||
| 95 | bool "UART1" | ||
| 96 | |||
| 97 | config EP93XX_EARLY_UART2 | ||
| 98 | bool "UART2" | ||
| 99 | |||
| 100 | config EP93XX_EARLY_UART3 | ||
| 101 | bool "UART3" | ||
| 102 | |||
| 103 | endchoice | ||
| 104 | |||
| 91 | endmenu | 105 | endmenu |
| 92 | 106 | ||
| 93 | endif | 107 | endif |
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) |
