diff options
author | Bill Richardson <wfrichar@chromium.org> | 2012-02-17 15:55:32 -0800 |
---|---|---|
committer | Bill Richardson <wfrichar@chromium.org> | 2012-02-17 15:55:32 -0800 |
commit | 737fbbd032ef937b37f2e5e833fa52455aa19c64 (patch) | |
tree | 81299d711c04775a4793e37bd103b60df4178e53 /chip/lm4/uart.c | |
parent | ad7a0d5ae67cd73fe11c92c1964496455490f2c9 (diff) | |
download | chrome-ec-737fbbd032ef937b37f2e5e833fa52455aa19c64.tar.gz |
Delay enabling UART1 until after LPC bus is enabled.
BUG=none
TEST=manual
Try it on a bds with no LPC bus. It gets a BusFault without this patch.
Change-Id: If3f38df5f7bebaf4c7045a9f48fbe3ac66e8bdbf
Diffstat (limited to 'chip/lm4/uart.c')
-rw-r--r-- | chip/lm4/uart.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/chip/lm4/uart.c b/chip/lm4/uart.c index 84916a07fb..96059c6e13 100644 --- a/chip/lm4/uart.c +++ b/chip/lm4/uart.c @@ -179,8 +179,20 @@ int uart_init(void) LM4_UART_CTL(ch) |= 0x0001; } - /* Enable interrupts */ + /* Enable interrupts for UART0 only. UART1 will have to wait until the + * LPC bus is initialized. + */ task_enable_irq(LM4_IRQ_UART0); + + return EC_SUCCESS; +} + + +/*****************************************************************************/ +/* COMx functions */ + +void uart_comx_enable(void) +{ task_enable_irq(LM4_IRQ_UART1); /* Print hello on UART1 for debugging */ @@ -190,12 +202,8 @@ int uart_init(void) while (*c) uart_comx_putc(*c++); } - - return EC_SUCCESS; } -/*****************************************************************************/ -/* COMx functions */ int uart_comx_putc_ok(void) { |