diff options
-rw-r--r-- | drivers/tty/serial/msm_serial.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c index 26df03878b7..4f9640d0b1b 100644 --- a/drivers/tty/serial/msm_serial.c +++ b/drivers/tty/serial/msm_serial.c @@ -682,17 +682,6 @@ static void msm_power(struct uart_port *port, unsigned int state, } #ifdef CONFIG_CONSOLE_POLL -static int msm_poll_init(struct uart_port *port) -{ - struct msm_port *msm_port = UART_TO_MSM(port); - - /* Enable single character mode on RX FIFO */ - if (msm_port->is_uartdm >= UARTDM_1P4) - msm_write(port, UARTDM_DMEN_RX_SC_ENABLE, UARTDM_DMEN); - - return 0; -} - static int msm_poll_get_char_single(struct uart_port *port) { struct msm_port *msm_port = UART_TO_MSM(port); @@ -704,7 +693,7 @@ static int msm_poll_get_char_single(struct uart_port *port) return msm_read(port, rf_reg) & 0xff; } -static int msm_poll_get_char_dm_1p3(struct uart_port *port) +static int msm_poll_get_char_dm(struct uart_port *port) { int c; static u32 slop; @@ -728,6 +717,10 @@ static int msm_poll_get_char_dm_1p3(struct uart_port *port) slop = msm_read(port, UARTDM_RF); c = sp[0]; count--; + msm_write(port, UART_CR_CMD_RESET_STALE_INT, UART_CR); + msm_write(port, 0xFFFFFF, UARTDM_DMRX); + msm_write(port, UART_CR_CMD_STALE_EVENT_ENABLE, + UART_CR); } else { c = NO_POLL_CHAR; } @@ -751,8 +744,8 @@ static int msm_poll_get_char(struct uart_port *port) imr = msm_read(port, UART_IMR); msm_write(port, 0, UART_IMR); - if (msm_port->is_uartdm == UARTDM_1P3) - c = msm_poll_get_char_dm_1p3(port); + if (msm_port->is_uartdm) + c = msm_poll_get_char_dm(port); else c = msm_poll_get_char_single(port); @@ -809,7 +802,6 @@ static struct uart_ops msm_uart_pops = { .verify_port = msm_verify_port, .pm = msm_power, #ifdef CONFIG_CONSOLE_POLL - .poll_init = msm_poll_init, .poll_get_char = msm_poll_get_char, .poll_put_char = msm_poll_put_char, #endif |