|
47 | 47 | /*
|
48 | 48 | * These are definitions for the Exar XR17V35X and XR17(C|D)15X
|
49 | 49 | */
|
| 50 | +#define UART_EXAR_INT0 0x80 |
50 | 51 | #define UART_EXAR_SLEEP 0x8b /* Sleep mode */
|
51 | 52 | #define UART_EXAR_DVID 0x8d /* Device identification */
|
52 | 53 |
|
@@ -1869,17 +1870,13 @@ static int serial8250_default_handle_irq(struct uart_port *port)
|
1869 | 1870 | static int exar_handle_irq(struct uart_port *port)
|
1870 | 1871 | {
|
1871 | 1872 | unsigned int iir = serial_port_in(port, UART_IIR);
|
1872 |
| - int ret; |
| 1873 | + int ret = 0; |
1873 | 1874 |
|
1874 |
| - ret = serial8250_handle_irq(port, iir); |
| 1875 | + if (((port->type == PORT_XR17V35X) || (port->type == PORT_XR17D15X)) && |
| 1876 | + serial_port_in(port, UART_EXAR_INT0) != 0) |
| 1877 | + ret = 1; |
1875 | 1878 |
|
1876 |
| - if ((port->type == PORT_XR17V35X) || |
1877 |
| - (port->type == PORT_XR17D15X)) { |
1878 |
| - serial_port_in(port, 0x80); |
1879 |
| - serial_port_in(port, 0x81); |
1880 |
| - serial_port_in(port, 0x82); |
1881 |
| - serial_port_in(port, 0x83); |
1882 |
| - } |
| 1879 | + ret |= serial8250_handle_irq(port, iir); |
1883 | 1880 |
|
1884 | 1881 | return ret;
|
1885 | 1882 | }
|
@@ -2177,6 +2174,8 @@ int serial8250_do_startup(struct uart_port *port)
|
2177 | 2174 | serial_port_in(port, UART_RX);
|
2178 | 2175 | serial_port_in(port, UART_IIR);
|
2179 | 2176 | serial_port_in(port, UART_MSR);
|
| 2177 | + if ((port->type == PORT_XR17V35X) || (port->type == PORT_XR17D15X)) |
| 2178 | + serial_port_in(port, UART_EXAR_INT0); |
2180 | 2179 |
|
2181 | 2180 | /*
|
2182 | 2181 | * At this point, there's no way the LSR could still be 0xff;
|
@@ -2335,6 +2334,8 @@ int serial8250_do_startup(struct uart_port *port)
|
2335 | 2334 | serial_port_in(port, UART_RX);
|
2336 | 2335 | serial_port_in(port, UART_IIR);
|
2337 | 2336 | serial_port_in(port, UART_MSR);
|
| 2337 | + if ((port->type == PORT_XR17V35X) || (port->type == PORT_XR17D15X)) |
| 2338 | + serial_port_in(port, UART_EXAR_INT0); |
2338 | 2339 | up->lsr_saved_flags = 0;
|
2339 | 2340 | up->msr_saved_flags = 0;
|
2340 | 2341 |
|
|
0 commit comments