use correct port type, which sets the correct receive fifo trigger options (#7095)
[oweals/openwrt.git] / target / linux / ar7 / patches-2.6.32 / 140-uart_port_ar7.patch
1     AR7: use correct UART port type
2
3     PORT_AR7 has the correct TRIG flag (UART_FCR_R_TRIG_00) as well as UART_CAP_AFE
4     being set. This fixes kernel console on TNETD7300 revision 0x02 and has no side
5     effects on other revisions of the chip.
6
7     Signed-off-by: Florian Fainelli <florian@openwrt.org>
8
9 Index: linux-2.6.32.12/arch/mips/ar7/platform.c
10 ===================================================================
11 --- linux-2.6.32.12.orig/arch/mips/ar7/platform.c       2010-05-15 18:01:11.000000000 +0200
12 +++ linux-2.6.32.12/arch/mips/ar7/platform.c    2010-05-15 18:02:44.000000000 +0200
13 @@ -509,7 +509,7 @@
14  
15         memset(uart_port, 0, sizeof(struct uart_port) * 2);
16  
17 -       uart_port[0].type = PORT_16550A;
18 +       uart_port[0].type = PORT_AR7;
19         uart_port[0].line = 0;
20         uart_port[0].irq = AR7_IRQ_UART0;
21         uart_port[0].uartclk = ar7_bus_freq() / 2;
22 @@ -524,7 +524,7 @@
23  
24         /* Only TNETD73xx have a second serial port */
25         if (ar7_has_second_uart()) {
26 -               uart_port[1].type = PORT_16550A;
27 +               uart_port[1].type = PORT_AR7;
28                 uart_port[1].line = 1;
29                 uart_port[1].irq = AR7_IRQ_UART1;
30                 uart_port[1].uartclk = ar7_bus_freq() / 2;