lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20251121-enable-ufs-ice-clock-scaling-v2-3-66cb72998041@oss.qualcomm.com>
Date: Fri, 21 Nov 2025 16:06:06 +0530
From: Abhinaba Rakshit <abhinaba.rakshit@....qualcomm.com>
To: Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konradybcio@...nel.org>,
        Manivannan Sadhasivam <mani@...nel.org>,
        "James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        Neeraj Soni <neeraj.soni@....qualcomm.com>
Cc: linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-scsi@...r.kernel.org,
        Abhinaba Rakshit <abhinaba.rakshit@....qualcomm.com>
Subject: [PATCH v2 3/3] soc: qcom: ice: Set ICE clk to TURBO on probe

MMC controller lacks a clock scaling mechanism, unlike the UFS
controller. By default, the MMC controller is set to TURBO mode
during probe, but the ICE clock remains at XO frequency,
leading to read/write performance degradation on eMMC.

To address this, set the ICE clock to TURBO during probe to
align it with the controller clock. This ensures consistent
performance and avoids mismatches between the controller
and ICE clock frequencies.

For platforms where ICE is represented as a separate device,
use the OPP framework to vote for TURBO mode, maintaining
proper voltage and power domain constraints. For legacy
targets where ICE is integrated with the storage controller,
fall back to using standard clock APIs to set the frequency.

Signed-off-by: Abhinaba Rakshit <abhinaba.rakshit@....qualcomm.com>
---
 drivers/soc/qcom/ice.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/soc/qcom/ice.c b/drivers/soc/qcom/ice.c
index c352446707ab5e90e6baf159c86a0914ff4bfc53..fd1ae680c64370ae6cc8f999fbab20e4e875be03 100644
--- a/drivers/soc/qcom/ice.c
+++ b/drivers/soc/qcom/ice.c
@@ -616,6 +616,11 @@ static struct qcom_ice *qcom_ice_create(struct device *dev,
 		if (clk_index < 0)
 			return ERR_PTR(clk_index);
 
+		/* Vote for maximum clock rate for maximum performance */
+		err = clk_set_rate(engine->core_clk, INT_MAX);
+		if (err)
+			dev_warn(dev, "Failed boosting the ICE clk to TURBO\n");
+
 		break;
 	}
 
@@ -636,6 +641,11 @@ static struct qcom_ice *qcom_ice_create(struct device *dev,
 		}
 		engine->has_opp = (err == 0);
 
+		/* Vote for maximum clock rate for maximum performance */
+		err = dev_pm_opp_set_rate(dev, INT_MAX);
+		if (err)
+			dev_warn(dev, "Failed boosting the ICE clk to TURBO\n");
+
 		/* Since, there is only one clock
 		 * index can be set as 0
 		 */

-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ