From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794523175; b=a1zzI3nu+sds7HHgCdqAtNCHmj8j8Gdx2ZZaNKwXMWzzm5eRdc2rxwhGJQd+fnHuJtQM rXzDxCkIRWOadPAIYYQFnAj4sSEALADbxXRgEJ6wgl6KzPnqFMx+AvDneSeh2sS3qLyAk IZ1yD/8d67COOVwttm/rBGPOiwRdiajWJ4zpFx8edeKPmt9DoBm/mzfEEEPlUF1VJYEtH aJRMdGhA+het2iITlbAYsJNwlag+RPs30N8ifSsY5+BMhUjaOyq4U43PSnz/P4/z2tr71 e2+Hu/qT+0GM0cgRG1+8d6FT8KX84cRqS3qPyRFuUO+psAsdsK1DOMicIihAjTsLfUQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794523175; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:From:Date: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer:X-Authority-Analysis: X-Proofpoint-ORIG-GUID:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-Spam-Info:X-Proofpoint-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=yc/mt44iiI3JDnoTa+amNxghgBGpPCt5eP48vxd/muE=; b=r/8SKxOTw5pnTsQO37yJmcsODNZjqdap/Wq7WKL7Or4ztWhUTZKM245p8VY2FfcLlywt +T3aUmjfED4GN3t1kCQwjgXN+n19UAPOSPhnhjglJuwPgNBVQbVyW+CMVk/kNutdpXHWY zA6qbvfkl32Vl4BaritGzsBVvLO8YEHCySTQ6/HVcjLgYWcUAxKSicvSvIwHQiZjsavPP O7O3BUSnPXAFd3Hg40c607ptZX1IQgSaDitpAnde9YCLjVS0OuoSEdDBd+u4cFZoxu+5E ND0p/Ba9R2IPJNWuEU3igDe3BC5uwGTjhqVhNrSOYONrljxqlzPxf6iSFThHkSsvySA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=dmOBb8rJ; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b="T/HlP/+a"; arc=none smtp.remote-ip=205.220.180.131 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73E7760A2616 for ; Thu, 12 Nov 2026 22:39:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 73E7760A2616 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=dmOBb8rJ; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=T/HlP/+a Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6ACJZdkY1690736 for ; Thu, 12 Nov 2026 22:39:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= yc/mt44iiI3JDnoTa+amNxghgBGpPCt5eP48vxd/muE=; b=dmOBb8rJ9DJUSOlN 31Fzm000FnyJBj+8QH/DajyZ69iDI04r1LceMymteo4RXucWdvGNTTGt6OAeOnU5 xbfGLc/WQvzimbrDkwOhWfhf9eMedTZb3eGzgYse0EwgmtqgTYG4ONV46Dwt6DB6 Uuxui7UGB3YIaQt+2YIEpamngOD8oRw+r7aXK3mYHDarFLSYkKX+kWFpTFR0U1p1 UByb1YQw3yh/H7r6RX+N0vkofYtgihVgHYGjRyv+OKhEuUZ43evtgFnOgetS32Kt 7nhEq8sZN+lgxKLIpX2CKj8dLct55F+8dQFiWnmkvStwh5k8RzzMHEU2Jlqa+itd 63uHSA== Received: from mail-dl1-f70.google.com (mail-dl1-f70.google.com [74.125.82.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hwkgw8hsn-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 12 Nov 2026 22:39:34 +0000 (GMT) Received: by mail-dl1-f70.google.com with SMTP id a92af1059eb24-1a5005fd0f8so748701c88.0 for ; Thu, 12 Nov 2026 14:39:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1794523173; x=1795127973; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=yc/mt44iiI3JDnoTa+amNxghgBGpPCt5eP48vxd/muE=; b=T/HlP/+ahzjBAHcmMwdp40+2HfWnVY6Wf5oa2Ecpg5OCTvBNoq2Wp/ppBQ+Cmfu8fy +UwoNevhqUJ/oiSUhVKINxiFItj5uEPOdpDckgTROpoPzRmxUeezZ2jm9xZOIbecp69d xOF8EcAZSdYcegY7k8M5v4U9ngtTxQAPe/MckIjHWHjdW8PjcyrmcNe1l/C8fWGpYw5U X7FLRl70rIWK9RaF7Ep8v340ghgNTEoZl+W+yz7TFljxGNwhJ6S85qprmmxPxvvJTAGY FFwfb3bzCTgt67nbOheXvh2OXkS0mjjfAfBL6R2GlOxetv/7uC6cftpjihqmPZwW3lgQ QcIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794523173; x=1795127973; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=yc/mt44iiI3JDnoTa+amNxghgBGpPCt5eP48vxd/muE=; b=qi7W0XDDMnmrhyreDrvd22OPqN3PcA/EUGV0hjIb2Mtj+aMaJYohsuQhUAaREz1uEb eCHE8x2TdocHvrDO++E7JVNBHQok6jW1o2bd3Pn85RWcKhq2aikoYDJkP29nixWi7fXC D++usM3PJMJXkk7kyoVPndcpyxU5iiORqrVxwLbhgtUQWRSnyX3rThosloZpC7vztQFG i8W/M2uOxozPxuboqA+LdaSAItgQpEiXrEjbNrEqna8hWktfXK2pLT0uMoTEKLKjH7t5 RfLPZwRMZkgfBfgeLouFdw7YjhWf1cmrRnUOzlYd0407Ry04tYCULYS3/W8t5KqYjuuO gJBQ== X-Forwarded-Encrypted: i=1; AL+hErHmklca2NfBGYqHuDoSWb2L/lJ7YY1nPePYDR7maFuYdgFLcwo0UaWn2CYI3L0UKHkMEf6mwoSpy4trXqw=@vger.kernel.org X-Gm-Message-State: APuU4Z/AuZCv2aOLfDZAA+KtqrEBcWeFFgi3O1fysYu7U1OkaWldYTRy OmgWuHhirU2deyAUV/rgfVep2MmZa13Us+bQqBBVBey8kmNFAAygpNBmFh4mzshM9SjzBtGMtQF HREkfdWjD9XNErkgStXdte9iABlGoOsrekP91T63pShByksPtVzEu8xV3rGLdAiAfr28= X-Gm-Gg: AYBFou1+ABuCOGjskrzru7tGonoIppkln4q+9C0XLsNu6zd0w7wNBc7F63de+P0WUrm 4ad72j2d9fWoJtoQJD+WbZ7FuSyBa1tYa+IctNKL9KihgvGJqorYCxfL8+vs+lpIG1yrWkQCJ1O 4fAxTo1FiDLdYq2Ci5zJBonYs6bxaP9yEFAsMluQr8p9ExRB1UOEtyNDkS9mYEjpUEudLfIJyVz Eh+QGGFUu6zdgXxNfoB0/YRA5dopB/WN9XZnt1i95POXC2PbReUd+/z4FyHt5+AR/FNQOAijqdc zMIjJTPm8HST2BSMYRPZoCzS4c2UF9Nd/+pOLNThRE3ji2LisysXqjNzpE6x+jeqSsAvAMAFfHh RYNckCGBQgNP51S3bvPFz9EVrbxw+nhtlXSlyRLHTEAgQbxSL/qgQdYk3D1myciluz4IboPoWMj uSqiYzh175wQ== X-Received: by 2002:a05:7023:904:b0:195:c6c2:c6b with SMTP id a92af1059eb24-1b50319ce0bmr844419c88.35.1794523173102; Thu, 12 Nov 2026 14:39:33 -0800 (PST) X-Received: by 2002:a05:7023:904:b0:195:c6c2:c6b with SMTP id a92af1059eb24-1b50319ce0bmr844351c88.35.1794523171031; Thu, 12 Nov 2026 14:39:31 -0800 (PST) Received: from hu-arakshit-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-1b5031468b7sm2333496c88.5.2026.11.12.14.39.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Nov 2026 14:39:30 -0800 (PST) From: Abhinaba Rakshit Date: Fri, 13 Nov 2026 04:08:29 +0530 Subject: [PATCH v13 3/6] mmc: sdhci-msm: Set ICE clk to TURBO at sdhci ICE init X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261113-enable-ice-clock-scaling-v13-3-258dc817bd63@oss.qualcomm.com> References: <20261113-enable-ice-clock-scaling-v13-0-258dc817bd63@oss.qualcomm.com> In-Reply-To: <20261113-enable-ice-clock-scaling-v13-0-258dc817bd63@oss.qualcomm.com> To: Abel Vesa , Bjorn Andersson , Konrad Dybcio , Manivannan Sadhasivam , "James E.J. Bottomley" , "Martin K. Petersen" , Adrian Hunter , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Neeraj Soni , Harshal Dev , Kuldeep Singh Cc: linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, Abhinaba Rakshit , Konrad Dybcio , Abel Vesa X-Mailer: b4 0.14.2 X-Authority-Analysis: v=2.4 cv=DNgacCNb c=1 sm=1 tr=0 ts=6af64026 cx=c_pps a=SvEPeNj+VMjHSW//kvnxuw==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=yx91gb_oNiZeI1HMLzn7:22 a=EUspDBNiAAAA:8 a=QyXUC8HyAAAA:8 a=PzEurhthzZq-M9kHIYIA:9 a=QEXdDO2ut3YA:10 a=Kq8ClHjjuc5pcCNDwlU0:22 X-Proofpoint-ORIG-GUID: 7SA1cS5eclByf8KQsOb9X5exgdXBYVix X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTEyMDA5MCBTYWx0ZWRfX3h1HShqJk8uh 42WdFoDJFDV/Ihov6VVfJnvNoDf0uE8ctMozD/LimRJsv8dFtgxKCwYSf8er9C9yN0IhbxJp1ml Ce14qAp6bzkteu1mM+XwaJxcGlh/iYrOCzna2zQc7u0NaQXco89YfDMjEOQbd3QUZhbrt2B1VLH Jp6+5yKnARU4EvJGQZg4mVMQ2IzwoptWIeDv3zWoL7yxf0x1avRBX7OiGPpaP+U9Sdcn7rFLVQR R2YUk6YwX0v3I1ImY7/sFY+Fr4K+E8X7VuIf2JOIlks77BDaRwD3ThFnpsNFdSfJYL1g7evVYVr l4uXiuh71kFoimt4xQ5tjZ8IwWxSAPWx+QOqIiyc/0O5TFpUFxZJhVIfZIGfwH5mIlYkahpq7VB SKHnlFhxeCHoiPkzoq9Gx9BN532BIPrXJJmh4CeyajWptedZZvyM6r8sINN6QxSLQ9pgAbHVeu9 +Ie3BKmfJt1YPHgGL+g== X-Proofpoint-Spam-Info: AW1haW4tMjYxMTEyMDA5MCBTYWx0ZWRfX+KY60qAH/SCh T06nEwZ8mUfPsbigFogA50OYcQU3It7lxtHiGJbohvgmUM+OTNwPreN9XiyraaPh/ghS5K0tgDQ 1s/PTIin40lK0EoIWhmGtkti9PBMztw= X-Proofpoint-GUID: 7SA1cS5eclByf8KQsOb9X5exgdXBYVix X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-12_03,2026-11-11_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 malwarescore=0 suspectscore=0 lowpriorityscore=0 phishscore=0 impostorscore=0 priorityscore=1501 clxscore=1015 adultscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611120090 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 sdhci_msm_ice_init 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. Reviewed-by: Konrad Dybcio Acked-by: Adrian Hunter Reviewed-by: Adrian Hunter Reviewed-by: Abel Vesa Signed-off-by: Abhinaba Rakshit --- drivers/mmc/host/sdhci-msm.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c index 32b1bcba47d6b75578f01d8de6ee9beea3b1e080..652c5cfc87bcc3c59b845b9e2fd785bcba197fa0 100644 --- a/drivers/mmc/host/sdhci-msm.c +++ b/drivers/mmc/host/sdhci-msm.c @@ -1902,6 +1902,16 @@ static void sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock) static const struct blk_crypto_ll_ops sdhci_msm_crypto_ops; /* forward decl */ +static int sdhci_msm_ice_scale_clk(struct sdhci_msm_host *msm_host, + unsigned long target_freq, + bool round_ceil) +{ + if (msm_host->mmc->caps2 & MMC_CAP2_CRYPTO) + return qcom_ice_scale_clk(msm_host->ice, target_freq, round_ceil); + + return 0; +} + static int sdhci_msm_ice_init(struct sdhci_msm_host *msm_host, struct cqhci_host *cq_host) { @@ -1960,6 +1970,11 @@ static int sdhci_msm_ice_init(struct sdhci_msm_host *msm_host, mmc->caps2 |= MMC_CAP2_CRYPTO; mmc->caps2 |= MMC_CAP2_CRYPTO_NO_REPROG; + + err = sdhci_msm_ice_scale_clk(msm_host, ULONG_MAX, false); + if (err && err != -EOPNOTSUPP) + dev_warn(dev, "Unable to boost ICE clock to TURBO\n"); + return 0; } @@ -2160,6 +2175,13 @@ sdhci_msm_ice_suspend(struct sdhci_msm_host *msm_host) static inline void sdhci_msm_ice_restore(struct sdhci_host *host) { } + +static inline int +sdhci_msm_ice_scale_clk(struct sdhci_msm_host *msm_host, unsigned long target_freq, + bool round_ceil) +{ + return 0; +} #endif /* !CONFIG_MMC_CRYPTO */ /*****************************************************************************\ -- 2.34.1