Skip to contentSkip to conversation

tty: serial: qcom_geni_serial: To correct logic for QUP HW version

PATCH Superseded Paras Sharma 2 participants 2 messages Jul 24, 2020

Subsystems (2)

v1 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tty: serial: qcom_geni_serial: To correct logic for QUP HW version

To correct the logic to detect whether the QUP HW version is greater
than 2.5.

---
 drivers/tty/serial/qcom_geni_serial.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/tty/serial/qcom_geni_serial.c +2 -1
index 1ed3d35..5b0efb49 100644
@@ -954,7 +954,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);
Signature · 2 lines
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member 
of Code Aurora Forum, hosted by The Linux Foundation
#1 lore raw
Quoted 2 lines · Paras Sharma

To correct the logic to detect whether the QUP HW version is greater
than 2.5.

The subject line and here does not make any sense. Can you reword this as what the problem is and why you need to change this?

Quoted 11 lines
---
 drivers/tty/serial/qcom_geni_serial.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/tty/serial/qcom_geni_serial.c +0 -0
index 1ed3d35..5b0efb49 100644

drivers/tty/serial/qcom_geni_serial.c static void qcom_geni_serial_set_termios(struct uart_port *uport, · line 958

Quoted 6 lines
drivers/tty/serial/qcom_geni_serial.c +2 -1
@@ -954,7 +954,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)

Odd coding style :(

Please fix all of the above up and resubmit a v2.

thanks,

greg k-h