From nobody Mon Feb 9 18:18:18 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB06C3491C8 for ; Fri, 23 Jan 2026 07:12:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769152357; cv=none; b=fScyvtOsPSEWeCYIrXVj2/8wa2rPoAntVBkftyr2BGVlSHjBPoF0mGKn7pPFzSzs5Zzsbpg19lDEeJoxq9R8+fgyOCxu1sptpRhEW9w37SOjIcRtRQfcslpRb6reqFVSP2/VoLLQ6RDydrCLgVhKDqkyHhXpr0bMMhTGfWGlfog= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769152357; c=relaxed/simple; bh=42Oia7LlBi+H523Rmn2IIOy7T1zt6E32yOR956DWeLM=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ujEvqtVOyER/XRYGqqIOxi1nrPT3QyLmj9/X6vyA8iMGXQLhv9QbqpLt7Vy1c7zp1lcCfHqSCYJUGwIlQcgcPcnXikOF2yrhwA8zMPxtvqaqhroTxDAPN0ouMReJRnx/LILxzr33L1gr9rPWVBqfq1+gaatKNHs4jPrd6QJ1nVs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=i2U5j4y5; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=UKTxxSqX; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject 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.b="i2U5j4y5"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="UKTxxSqX" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60N5m0b53504255 for ; Fri, 23 Jan 2026 07:12:35 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= CAqEF9ipkGXaLh8o6lQtStQbpT65DW2PvBWxy9J0Ebs=; b=i2U5j4y5e34Rp0p1 VUJ9iK+HIcAXwReO4m2dQRbSimKcbiG6bEH5EBlzXAqWIldWftIbvde+7wSYWN/D tCZa6OhVDYDn1JO2Wi3/u67OcsR+QLMubkoRz35j0m94W9xm2FwRUExNfMfwwfSB yu36lIhENLqsEYXx4kybda3EOwpkFmW2hAgJkiUn6eT3tcSeY47BfEi9aOUJVnf8 zkaVMwjCYkZaDyd7nQyRLWsYVczAcELUd/D4DRPm8O9n8cFN+vM3OfV62CHE5qJN 1GC9KcpI9c8AnYzYvc0lnvWpXonU8/CcodZellwJGhd14tB9ug4ucRorvlsVgA1S i4jNzA== Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bus9823xj-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 23 Jan 2026 07:12:35 +0000 (GMT) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-2a7a98ba326so19980225ad.1 for ; Thu, 22 Jan 2026 23:12:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1769152354; x=1769757154; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=CAqEF9ipkGXaLh8o6lQtStQbpT65DW2PvBWxy9J0Ebs=; b=UKTxxSqXvtxL+VyQX30JU+SXD8eS1mgPAbGH+mapoGBNWMWDhEKjIu3Ctjn9lBtgcs FadXwyMjXhVCio5YHX6eh7ym4kxDbpqzySdBVuuUUZC4CY09GS47TRU+1b1FcA2le925 oazP7oNqKgd3/jyxFg6Tnc4YILe505Sy0NvqIoHmQNJxh55RRzXu31k7qRg0P91lTzPI Idly6rd2E38td5k/GKNYMbJFSujTYzc5F2bMkhcTo0DiI/pvMT0qEEs/TMPRSeLDW4YO hStpsXZPpMXD07wlpA0ta4zjq7hjDuwdlkqYE7VByCAo8utk2XOrtl+6hL6qaUvGx94c h3Jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769152354; x=1769757154; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=CAqEF9ipkGXaLh8o6lQtStQbpT65DW2PvBWxy9J0Ebs=; b=NYpEnbO1hKpmfynnzEGHrBqkm69avmW2DcMD3r5vl6xjgJdAOSHgoDyRKE4UGcZHcB amdtapRyklrvWsCga+30f57TBc+d8xic4J+ATfIAherSAYGamJAPaqOeZ1kvTpIJVbAc fEqwa20zhETECVwjLko+lBL5I4PnDLwSGtd7fEtSDIrlZillTC45CWqRlvYeQzmdv03u sD/L171u5/PCREutgoAgDN5CHOfDhCZHL5XdRVgr7A0Yb0eOf6ALo1aDHrs77HpDJPn6 C8cPNh47EZABb687yK7t53ID79b+hxqOn2Nt3HGVwrXGo1N3zweI90EI0ffK9nK7Q+Av t4Jg== X-Forwarded-Encrypted: i=1; AJvYcCUOztKOD2Hkn9a8/0jA+VJ766rdIAV4SJAysEEiCxvqZ4CjoAtKlyKVK1dtPE1Ops8sFeDYKICioKUfeWw=@vger.kernel.org X-Gm-Message-State: AOJu0YxWnugEQ9MN5HkBajMY407SspdgTaoj0j+g1HETWF0RUFXgDVv/ pPjcQMoDIHahOkua5397fj/perESIG2/zwAVjgNJcmjfiwvKj352y1ewc9ZrUoA1sWca8VhnwYG g3uLQPJ4fMKPF1SGk0r4dhVI+4PfBt/gJyy4HSFI3f3QhwRuaz+JSEHI9E4Z9dfoDUls= X-Gm-Gg: AZuq6aJ4MSliYbh7Kh4UobCn/Pu1IdwmsTQDP+FrGRVJSz+3PdWUnozqLS5fMJH3f1Z Uhq3ILRxWijdEzWm+QcV937OZKCASvFBai8zgmbOEOI5zlFNrlvIuqnFslv3aNHAMkfnwds+wkK 6B9NVtAOdjn0gJpQ99TVyp5YRsK+2Yq19NXew9phUlekPUuOdgWUTa0/U+RrS2X5CamZqduAg3Y XzcpoD0qCmeLsKtD3ctCeriVKZwWospPT5AiinU3hv/Bn+XnzmROui1J9DakzkD/KqvGlByrfIu ke9a2zhMyfJ7XnXwzO+yGVQLIRKY6sISMGlMeSoCq21UK/p69ac6Y9f9hOPPVkvfz3CyNsqB06j DMa/kOai3DSS8JVQi6qRl4cgv/5sxZ0kfB4AfzPDp+C4T4ZY= X-Received: by 2002:a17:902:e94d:b0:2a0:c92e:a378 with SMTP id d9443c01a7336-2a7fe75b8d7mr21800315ad.7.1769152354504; Thu, 22 Jan 2026 23:12:34 -0800 (PST) X-Received: by 2002:a17:902:e94d:b0:2a0:c92e:a378 with SMTP id d9443c01a7336-2a7fe75b8d7mr21800085ad.7.1769152353970; Thu, 22 Jan 2026 23:12:33 -0800 (PST) Received: from hu-arakshit-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a802f978e0sm11336775ad.62.2026.01.22.23.12.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jan 2026 23:12:33 -0800 (PST) From: Abhinaba Rakshit Date: Fri, 23 Jan 2026 12:42:13 +0530 Subject: [PATCH v3 2/3] ufs: host: Add ICE clock scaling during UFS clock changes Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260123-enable-ufs-ice-clock-scaling-v3-2-d0d8532abd98@oss.qualcomm.com> References: <20260123-enable-ufs-ice-clock-scaling-v3-0-d0d8532abd98@oss.qualcomm.com> In-Reply-To: <20260123-enable-ufs-ice-clock-scaling-v3-0-d0d8532abd98@oss.qualcomm.com> To: Bjorn Andersson , Konrad Dybcio , Manivannan Sadhasivam , "James E.J. Bottomley" , "Martin K. Petersen" , Neeraj Soni Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, Abhinaba Rakshit X-Mailer: b4 0.14.2 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTIzMDA1NCBTYWx0ZWRfX3sw1GuWfuKnB K7vQGaloYMAbah+fjLOW9txduixRAqkNEQmKK0yIgTQvoZR6NL+I9W9ndJpQ2VyKl5UBcV+US8K XfE0XXJ3Uxc/NPzfrFx0/qH5UgsgtW3cJi2I01SmtuzS897L5Czljgk1DSJvdcgBSA3aLShBkVv Qqez1xGNhSDOKInAWKZ32Mk1080KLtPtBzEvkhbJsAAoxLwFhbm3wDDSpvXRkvyhoSi0wKzUBDN CXHzQSu7X2rp6sLUF2VkrDnAnwJHPOFOOcLXrqyWcjtfg0Si2Wgw2eL+Fr63EOxJ+k4zKu/H7Qr oi6VGi60QIsFbp4ItSZCZidDOkko45vS0wFR6V72f6ae3FoegLw6xg9cXLj3WANIemNVNxZoriZ D6834MBBVYX4z7WfPEXgniuZhbs+07FhYvs6uVjpTuqkqgaAXTnP14iyknkmf9vyIKgwOLQawrw P6bvZL488nlB3sDUN+g== X-Authority-Analysis: v=2.4 cv=JuX8bc4C c=1 sm=1 tr=0 ts=69731f63 cx=c_pps a=IZJwPbhc+fLeJZngyXXI0A==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=lzHOrk3F_0XHYG_XrgYA:9 a=QEXdDO2ut3YA:10 a=uG9DUKGECoFWVXl0Dc02:22 X-Proofpoint-GUID: RpKRJouMaXQ0yJKejt2T-1TUoXyLl77X X-Proofpoint-ORIG-GUID: RpKRJouMaXQ0yJKejt2T-1TUoXyLl77X X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.20,FMLib:17.12.100.49 definitions=2026-01-22_06,2026-01-22_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 priorityscore=1501 spamscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 suspectscore=0 clxscore=1015 impostorscore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2601150000 definitions=main-2601230054 Implement ICE (Inline Crypto Engine) clock scaling in sync with UFS controller clock scaling. This ensures that the ICE operates at an appropriate frequency when the UFS clocks are scaled up or down, improving performance and maintaining stability for crypto operations. Signed-off-by: Abhinaba Rakshit --- drivers/ufs/host/ufs-qcom.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c index 8d119b3223cbdaa3297d2beabced0962a1a847d5..a60b60eb777a674fb4345fd393b= de0eab3571a23 100644 --- a/drivers/ufs/host/ufs-qcom.c +++ b/drivers/ufs/host/ufs-qcom.c @@ -305,6 +305,14 @@ static int ufs_qcom_ice_prepare_key(struct blk_crypto_= profile *profile, return qcom_ice_prepare_key(host->ice, lt_key, lt_key_size, eph_key); } =20 +static int ufs_qcom_ice_scale_clk(struct ufs_qcom_host *host, bool scale_u= p) +{ + if (host->hba->caps & UFSHCD_CAP_CRYPTO) + return qcom_ice_scale_clk(host->ice, scale_up); + + return 0; +} + static const struct blk_crypto_ll_ops ufs_qcom_crypto_ops =3D { .keyslot_program =3D ufs_qcom_ice_keyslot_program, .keyslot_evict =3D ufs_qcom_ice_keyslot_evict, @@ -339,6 +347,11 @@ static void ufs_qcom_config_ice_allocator(struct ufs_q= com_host *host) { } =20 +static int ufs_qcom_ice_scale_clk(struct ufs_qcom_host *host, bool scale_u= p) +{ + return 0; +} + #endif =20 static void ufs_qcom_disable_lane_clks(struct ufs_qcom_host *host) @@ -1646,6 +1659,8 @@ static int ufs_qcom_clk_scale_notify(struct ufs_hba *= hba, bool scale_up, else err =3D ufs_qcom_clk_scale_down_post_change(hba, target_freq); =20 + if (!err) + err =3D ufs_qcom_ice_scale_clk(host, scale_up); =20 if (err) { ufshcd_uic_hibern8_exit(hba); --=20 2.34.1