mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
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
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -74,6 +74,7 @@ int main(void)
|
||||
#ifdef CONFIG_LPC
|
||||
port_80_init();
|
||||
lpc_init();
|
||||
uart_comx_enable();
|
||||
#endif
|
||||
#ifdef CONFIG_PWM
|
||||
pwm_init();
|
||||
|
||||
@@ -173,6 +173,9 @@ void uart_process(void);
|
||||
/*****************************************************************************/
|
||||
/* COMx functions */
|
||||
|
||||
/* Enables comx interrupts */
|
||||
void uart_comx_enable(void);
|
||||
|
||||
/* Returns non-zero if ok to put a character via uart_comx_putc(). */
|
||||
int uart_comx_putc_ok(void);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user