diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2016-05-12 01:02:27 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-25 17:23:54 (GMT) |
commit | 2a31f094553125e0353b9f7e7b6e9aeea752fed3 (patch) | |
tree | 0e931296737e473cc6186633e05739315e51c2c2 /drivers/tty | |
parent | 321737416c72dc3d3dd8753c3684c6eb86d0ea6c (diff) | |
download | linux-2a31f094553125e0353b9f7e7b6e9aeea752fed3.tar.xz |
tty: serial: msm: Only configure MND registers on hw that has it
The registers that msm_serial_set_mnd_regs() writes only exist on
the non-uartdm hardware, so let's return early here if this
function is called on uartdm hardware. This also prevents us from
messing up the uartclk variable if the uartclk rate happens to be
19.2 or 4.8 MHz.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/msm_serial.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c index 28b8ac4..a051dc5 100644 --- a/drivers/tty/serial/msm_serial.c +++ b/drivers/tty/serial/msm_serial.c @@ -232,6 +232,15 @@ static void msm_serial_set_mnd_regs_tcxoby4(struct uart_port *port) static void msm_serial_set_mnd_regs(struct uart_port *port) { + struct msm_port *msm_port = UART_TO_MSM(port); + + /* + * These registers don't exist so we change the clk input rate + * on uartdm hardware instead + */ + if (msm_port->is_uartdm) + return; + if (port->uartclk == 19200000) msm_serial_set_mnd_regs_tcxo(port); else if (port->uartclk == 4800000) |