diff options
author | Hartley Sweeten <hartleys@visionengravers.com> | 2008-10-02 12:13:02 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-03 06:03:39 -0400 |
commit | 92e88aa7fb8190031dca9e04acbf4821bd77941b (patch) | |
tree | 019a5626b59a2e1715aa2b112663fb79c9f2a9bc /arch/arm/mach-ep93xx/include | |
parent | 7a1f3701183e2efb45e480517e29f6880e105f7b (diff) |
[ARM] 5276/1: ep93xx: allow selecting UART for early kernel messages
Currently on the EP93xx platform early kernel messages go to UART1.
Since this UART is the only one that has modem control signals it
might be used for another purpose and it is undesirable for those
messages to appear. This patch allows one of the other UARTs to be
selected in the kernel configuration. It is assumed that the
bootloader has configured and initialized the UART since this was the
previous assumption.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-ep93xx/include')
-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) |