summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2016-05-11 18:02:27 -0700
committerSatya Durga Srinivasu Prabhala <satyap@codeaurora.org>2016-08-11 18:19:08 -0700
commit2ce98e59931440e69a94fcb5a9adaa9b7cc7a787 (patch)
tree1838f2d914c69335c71de428c8c65c6b9af0bbed /drivers/tty
parent72ca03d8bf77ed60e2d4dec311caa0a528d12612 (diff)
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. CRs-Fixed: 1053499 Change-Id: I0a336cc928bbff5bba253281ff7deca52414ba9d 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> Git-commit: 2a31f094553125e0353b9f7e7b6e9aeea752fed3 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/msm_serial.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index c2e4ef934241..53677cbf3ca1 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)