LM3/4: Several errors were unmasked with UARTs > UART2 were enabled. Fromo Gosha
This commit is contained in:
parent
172699fc96
commit
7f8a0a01c7
@ -77,31 +77,31 @@
|
||||
# define LM_CONSOLE_PARITY CONFIG_UART2_PARITY
|
||||
# define LM_CONSOLE_2STOP CONFIG_UART2_2STOP
|
||||
#elif defined(CONFIG_UART3_SERIAL_CONSOLE)
|
||||
# define LM_CONSOLE_BASE LM_UART2_BASE
|
||||
# define LM_CONSOLE_BASE LM_UART3_BASE
|
||||
# define LM_CONSOLE_BAUD CONFIG_UART3_BAUD
|
||||
# define LM_CONSOLE_BITS CONFIG_UART3_BITS
|
||||
# define LM_CONSOLE_PARITY CONFIG_UART3_PARITY
|
||||
# define LM_CONSOLE_2STOP CONFIG_UART3_2STOP
|
||||
#elif defined(CONFIG_UART4_SERIAL_CONSOLE)
|
||||
# define LM_CONSOLE_BASE LM_UART2_BASE
|
||||
# define LM_CONSOLE_BASE LM_UART4_BASE
|
||||
# define LM_CONSOLE_BAUD CONFIG_UART4_BAUD
|
||||
# define LM_CONSOLE_BITS CONFIG_UART4_BITS
|
||||
# define LM_CONSOLE_PARITY CONFIG_UART4_PARITY
|
||||
# define LM_CONSOLE_2STOP CONFIG_UART4_2STOP
|
||||
#elif defined(CONFIG_UART5_SERIAL_CONSOLE)
|
||||
# define LM_CONSOLE_BASE LM_UART2_BASE
|
||||
# define LM_CONSOLE_BASE LM_UART5_BASE
|
||||
# define LM_CONSOLE_BAUD CONFIG_UART5_BAUD
|
||||
# define LM_CONSOLE_BITS CONFIG_UART5_BITS
|
||||
# define LM_CONSOLE_PARITY CONFIG_UART5_PARITY
|
||||
# define LM_CONSOLE_2STOP CONFIG_UART5_2STOP
|
||||
#elif defined(CONFIG_UART6_SERIAL_CONSOLE)
|
||||
# define LM_CONSOLE_BASE LM_UART2_BASE
|
||||
# define LM_CONSOLE_BASE LM_UART6_BASE
|
||||
# define LM_CONSOLE_BAUD CONFIG_UART6_BAUD
|
||||
# define LM_CONSOLE_BITS CONFIG_UART6_BITS
|
||||
# define LM_CONSOLE_PARITY CONFIG_UART6_PARITY
|
||||
# define LM_CONSOLE_2STOP CONFIG_UART6_2STOP
|
||||
#elif defined(CONFIG_UART7_SERIAL_CONSOLE)
|
||||
# define LM_CONSOLE_BASE LM_UART2_BASE
|
||||
# define LM_CONSOLE_BASE LM_UART7_BASE
|
||||
# define LM_CONSOLE_BAUD CONFIG_UART7_BAUD
|
||||
# define LM_CONSOLE_BITS CONFIG_UART7_BITS
|
||||
# define LM_CONSOLE_PARITY CONFIG_UART7_PARITY
|
||||
@ -354,7 +354,4 @@ void up_lowsetup(void)
|
||||
ctl |= (UART_CTL_UARTEN|UART_CTL_TXE|UART_CTL_RXE);
|
||||
putreg32(ctl, LM_CONSOLE_BASE+LM_UART_CTL_OFFSET);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -960,10 +960,53 @@ static int up_interrupt(int irq, void *context)
|
||||
dev = &g_uart1port;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef CONFIG_LM_UART2
|
||||
if (g_uart2priv.irq == irq)
|
||||
{
|
||||
dev = &g_uart2port;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef CONFIG_LM_UART3
|
||||
if (g_uart3priv.irq == irq)
|
||||
{
|
||||
dev = &g_uart3port;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef CONFIG_LM_UART4
|
||||
if (g_uart4priv.irq == irq)
|
||||
{
|
||||
dev = &g_uart4port;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef CONFIG_LM_UART5
|
||||
if (g_uart5priv.irq == irq)
|
||||
{
|
||||
dev = &g_uart5port;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef CONFIG_LM_UART6
|
||||
if (g_uart6priv.irq == irq)
|
||||
{
|
||||
dev = &g_uart6port;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef CONFIG_LM_UART7
|
||||
if (g_uart7priv.irq == irq)
|
||||
{
|
||||
dev = &g_uart7port;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
PANIC();
|
||||
}
|
||||
|
||||
priv = (struct up_dev_s*)dev->priv;
|
||||
|
||||
/* Loop until there are no characters to be transferred or,
|
||||
|
Loading…
Reference in New Issue
Block a user