From: Paras Sharma <parashar@codeaurora.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jiri Slaby <jslaby@suse.com>,
linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org,
linux-kernel@vger.kernel.org, akashast@codeaurora.org,
Paras Sharma <parashar@codeaurora.org>
Subject: [PATCH] serial: qcom_geni_serial: To correct QUP Version detection logic
Date: Wed, 2 Sep 2020 11:26:51 +0530 [thread overview]
Message-ID: <1599026211-12800-1-git-send-email-parashar@codeaurora.org> (raw)
The current implementation reduces the sampling rate by half
if qup HW version is greater is than 2.5 by checking if the
geni SE major version is greater than 2 and geni SE minor version
is greater than 5.
This implementation fails when the version is 3 or greater.
Hence new implementation checks if version is greater than or equal
to 0x20050000 which would work for any future version.
Signed-off-by: Paras Sharma <parashar@codeaurora.org>
---
drivers/tty/serial/qcom_geni_serial.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index f0b1b47..e18b431 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -1000,7 +1000,7 @@ static void qcom_geni_serial_set_termios(struct uart_port *uport,
sampling_rate = UART_OVERSAMPLING;
/* Sampling rate is halved for IP versions >= 2.5 */
ver = geni_se_get_qup_hw_version(&port->se);
- if (GENI_SE_VERSION_MAJOR(ver) >= 2 && GENI_SE_VERSION_MINOR(ver) >= 5)
+ if (ver >= 0x20050000)
sampling_rate /= 2;
clk_rate = get_clk_div_rate(baud, sampling_rate, &clk_div);
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation
next reply other threads:[~2020-09-02 5:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-02 5:56 Paras Sharma [this message]
2020-09-02 6:04 ` [PATCH] serial: qcom_geni_serial: To correct QUP Version detection logic Greg Kroah-Hartman
2020-09-10 6:24 ` parashar
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=1599026211-12800-1-git-send-email-parashar@codeaurora.org \
--to=parashar@codeaurora.org \
--cc=akashast@codeaurora.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.