From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] tty: serial: msm: Only configure MND registers on hw that has it
Date: Wed, 11 May 2016 18:02:27 -0700 [thread overview]
Message-ID: <20160512010228.21548-3-sboyd@codeaurora.org> (raw)
In-Reply-To: <20160512010228.21548-1-sboyd@codeaurora.org>
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>
---
drivers/tty/serial/msm_serial.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index 28b8ac423de1..a051dc5def24 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)
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2016-05-12 1:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-12 1:02 [PATCH 0/3] msm_serial cleanups Stephen Boyd
2016-05-12 1:02 ` [PATCH 1/3] tty: serial: msm: Move header file into driver Stephen Boyd
2016-06-05 19:03 ` Andy Gross
2016-05-12 1:02 ` Stephen Boyd [this message]
2016-06-05 19:04 ` [PATCH 2/3] tty: serial: msm: Only configure MND registers on hw that has it Andy Gross
2016-05-12 1:02 ` [PATCH 3/3] tty: serial: msm: Cleanup include usage Stephen Boyd
2016-06-05 19:05 ` Andy Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160512010228.21548-3-sboyd@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).