diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-02-06 13:41:43 -0800 |
---|---|---|
committer | Randall Spangler <rspangler@chromium.org> | 2012-02-06 14:53:49 -0800 |
commit | 300e7edb87b9f19bcf0a91a9c0273106e646d897 (patch) | |
tree | 5c5a4b7afcf6f3d7db6144f592204281cc239158 /chip/lm4/uart.c | |
parent | 6409913523b047ca7b1dd39bb51edf11f3eefdaa (diff) | |
download | chrome-ec-300e7edb87b9f19bcf0a91a9c0273106e646d897.tar.gz |
Add UART1 receive support (UART to x86 console)
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:7488
TEST=type things into the x86 console UART; should appear on the u-boot prompt
Change-Id: I75fd225842c03d11d79280fb7453ad37695279e3
Diffstat (limited to 'chip/lm4/uart.c')
-rw-r--r-- | chip/lm4/uart.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chip/lm4/uart.c b/chip/lm4/uart.c index 7fa01dec7a..1f4205d4fd 100644 --- a/chip/lm4/uart.c +++ b/chip/lm4/uart.c @@ -104,6 +104,13 @@ static void uart_1_interrupt(void) LM4_UART_DR(1) = lpc_comx_get_char(); LM4_UART_IM(1) &= ~0x20; } + + /* Handle received character. There is no flow control on input; + * received characters are blindly forwarded to LPC. This is ok + * because LPC is much faster than UART, and we don't have flow control + * on the UART receive-side either. */ + if (!(LM4_UART_FR(1) & 0x10)) + lpc_comx_put_char(LM4_UART_DR(1)); } /* Must be same prio as LPC interrupt handler so they don't preempt */ DECLARE_IRQ(LM4_IRQ_UART1, uart_1_interrupt, 2); @@ -183,11 +190,9 @@ int uart_init(void) return EC_SUCCESS; } - /*****************************************************************************/ /* COMx functions */ - int uart_comx_putc_ok(void) { if (LM4_UART_FR(1) & 0x20) { |