From patchwork Fri Jul 24 06:14:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paras Sharma X-Patchwork-Id: 11682107 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 94135722 for ; Fri, 24 Jul 2020 06:14:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 84C492074F for ; Fri, 24 Jul 2020 06:14:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726591AbgGXGOV (ORCPT ); Fri, 24 Jul 2020 02:14:21 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:21431 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726539AbgGXGOV (ORCPT ); Fri, 24 Jul 2020 02:14:21 -0400 Received: from ironmsg07-lv.qualcomm.com (HELO ironmsg07-lv.qulacomm.com) ([10.47.202.151]) by alexa-out.qualcomm.com with ESMTP; 23 Jul 2020 23:14:21 -0700 Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by ironmsg07-lv.qulacomm.com with ESMTP/TLS/AES256-SHA; 23 Jul 2020 23:14:19 -0700 Received: from parashar-linux.qualcomm.com ([10.206.13.63]) by ironmsg02-blr.qualcomm.com with ESMTP; 24 Jul 2020 11:44:07 +0530 Received: by parashar-linux.qualcomm.com (Postfix, from userid 2363307) id A04AE21443; Fri, 24 Jul 2020 11:44:06 +0530 (IST) From: Paras Sharma To: Greg Kroah-Hartman Cc: Jiri Slaby , linux-arm-msm@vger.kernel.org, linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, akashast@codeaurora.org, Paras Sharma Subject: [PATCH] tty: serial: qcom_geni_serial: To correct logic for QUP HW version Date: Fri, 24 Jul 2020 11:44:02 +0530 Message-Id: <1595571242-9967-1-git-send-email-parashar@codeaurora.org> X-Mailer: git-send-email 2.7.4 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org To correct the logic to detect whether the QUP HW version is greater than 2.5. Signed-off-by: Paras Sharma --- 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 1ed3d35..5b0efb49 100644 --- a/drivers/tty/serial/qcom_geni_serial.c +++ b/drivers/tty/serial/qcom_geni_serial.c @@ -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);