* [PATCH V2] serial: qcom_geni_serial: To correct QUP Version detection logic
@ 2020-08-11 7:43 Paras Sharma
2020-08-11 8:23 ` Greg Kroah-Hartman
2020-08-11 10:50 ` Felipe Balbi
0 siblings, 2 replies; 4+ messages in thread
From: Paras Sharma @ 2020-08-11 7:43 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Jiri Slaby, linux-arm-msm, linux-serial, linux-kernel, Paras Sharma
The current implementation reduces the sampling rate by half
if qup HW version 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 by adding the another check for geni SE major version,
this problem can be solved.
Signed-off-by: Paras Sharma <parashar@codeaurora.org>
---
drivers/tty/serial/qcom_geni_serial.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
index 3aa29d2..a9f92d8 100644
--- a/drivers/tty/serial/qcom_geni_serial.c
+++ b/drivers/tty/serial/qcom_geni_serial.c
@@ -995,7 +995,8 @@ 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 ((GENI_SE_VERSION_MAJOR(ver) >= 2 && GENI_SE_VERSION_MINOR(ver) >= 5)
+ || GENI_SE_VERSION_MAJOR(ver) >= 3)
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V2] serial: qcom_geni_serial: To correct QUP Version detection logic
2020-08-11 7:43 [PATCH V2] serial: qcom_geni_serial: To correct QUP Version detection logic Paras Sharma
@ 2020-08-11 8:23 ` Greg Kroah-Hartman
2020-08-28 8:18 ` Greg Kroah-Hartman
2020-08-11 10:50 ` Felipe Balbi
1 sibling, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2020-08-11 8:23 UTC (permalink / raw)
To: Paras Sharma; +Cc: Jiri Slaby, linux-arm-msm, linux-serial, linux-kernel
On Tue, Aug 11, 2020 at 01:13:14PM +0530, Paras Sharma wrote:
> The current implementation reduces the sampling rate by half
> if qup HW version 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 by adding the another check for geni SE major version,
> this problem can be solved.
>
> Signed-off-by: Paras Sharma <parashar@codeaurora.org>
> ---
> drivers/tty/serial/qcom_geni_serial.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Should this go to stable kernels? If so, how far back? What git commit
id is this patch fixing? And if so, why not put a Fixes: tag on this as
well?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V2] serial: qcom_geni_serial: To correct QUP Version detection logic
2020-08-11 8:23 ` Greg Kroah-Hartman
@ 2020-08-28 8:18 ` Greg Kroah-Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2020-08-28 8:18 UTC (permalink / raw)
To: Paras Sharma; +Cc: Jiri Slaby, linux-arm-msm, linux-serial, linux-kernel
On Tue, Aug 11, 2020 at 10:23:30AM +0200, Greg Kroah-Hartman wrote:
> On Tue, Aug 11, 2020 at 01:13:14PM +0530, Paras Sharma wrote:
> > The current implementation reduces the sampling rate by half
> > if qup HW version 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 by adding the another check for geni SE major version,
> > this problem can be solved.
> >
> > Signed-off-by: Paras Sharma <parashar@codeaurora.org>
> > ---
> > drivers/tty/serial/qcom_geni_serial.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
>
> Should this go to stable kernels? If so, how far back? What git commit
> id is this patch fixing? And if so, why not put a Fixes: tag on this as
> well?
Dropped from my review queue due to lack of response, please fix up and
resend when you wish to have it reviewed again...
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V2] serial: qcom_geni_serial: To correct QUP Version detection logic
2020-08-11 7:43 [PATCH V2] serial: qcom_geni_serial: To correct QUP Version detection logic Paras Sharma
2020-08-11 8:23 ` Greg Kroah-Hartman
@ 2020-08-11 10:50 ` Felipe Balbi
1 sibling, 0 replies; 4+ messages in thread
From: Felipe Balbi @ 2020-08-11 10:50 UTC (permalink / raw)
To: Paras Sharma, Greg Kroah-Hartman
Cc: Jiri Slaby, linux-arm-msm, linux-serial, linux-kernel, Paras Sharma
[-- Attachment #1: Type: text/plain, Size: 1653 bytes --]
Hi,
Paras Sharma <parashar@codeaurora.org> writes:
> The current implementation reduces the sampling rate by half
> if qup HW version greater is than 2.5 by checking if the geni
^^^^^^^^^^^^^^^
is greater than
could, possibly, be fixed while applying.
> 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 by adding the another check for geni SE major version,
> this problem can be solved.
>
> Signed-off-by: Paras Sharma <parashar@codeaurora.org>
> ---
> drivers/tty/serial/qcom_geni_serial.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/qcom_geni_serial.c b/drivers/tty/serial/qcom_geni_serial.c
> index 3aa29d2..a9f92d8 100644
> --- a/drivers/tty/serial/qcom_geni_serial.c
> +++ b/drivers/tty/serial/qcom_geni_serial.c
> @@ -995,7 +995,8 @@ 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 ((GENI_SE_VERSION_MAJOR(ver) >= 2 && GENI_SE_VERSION_MINOR(ver) >= 5)
> + || GENI_SE_VERSION_MAJOR(ver) >= 3)
it looks like having a single GENI_SE_VERSION() that returns MAJOR and
MINOR without STEP would look better here. Then you could use:
if (GENI_SE_VERSION(ver) >= 0x20050000)
and it would work for any future version. Not a strong opinion, though
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-08-28 8:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-11 7:43 [PATCH V2] serial: qcom_geni_serial: To correct QUP Version detection logic Paras Sharma
2020-08-11 8:23 ` Greg Kroah-Hartman
2020-08-28 8:18 ` Greg Kroah-Hartman
2020-08-11 10:50 ` Felipe Balbi
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).