From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
To: Giri Prasad Goriparthi <giri.goriparthi@oss.qualcomm.com>,
Manivannan Sadhasivam <mani@kernel.org>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <mkp@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Abel Vesa <abelvesa@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: Nitin Rawat <nitin.rawat@oss.qualcomm.com>,
linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
Ziqi Chen <ziqi.chen@oss.qualcomm.com>
Subject: Re: [PATCH v2 1/3] scsi: ufs: ufs-qcom: Add specified gear support for multi gear scaling
Date: Wed, 2 Dec 2026 12:20:41 +0100 [thread overview]
Message-ID: <ace21a2a-df5a-4158-b962-9f39fab8aa4f@oss.qualcomm.com> (raw)
In-Reply-To: <20261202-b4-ufs-qcom-multi-gear-scaling-v2-1-e2fe4cbce19d@oss.qualcomm.com>
On 12/2/26 9:14 AM, Giri Prasad Goriparthi wrote:
> The UFS clock frequency and gear speed do not necessarily have a strict
> one-to-one correspondence on all platforms. Introduce a device tree
> based configuration interface that allows specifying the HS gear
> speed for each supported operating frequency via the "opp-level"
> property in the OPP table. When this property is not configured, the
> driver falls back to the default frequency-to-gear mapping table.
>
> Signed-off-by: Ziqi Chen <ziqi.chen@oss.qualcomm.com>
> Signed-off-by: Nitin Rawat <nitin.rawat@oss.qualcomm.com>
> Signed-off-by: Giri Prasad Goriparthi <giri.goriparthi@oss.qualcomm.com>
> ---
> drivers/ufs/host/ufs-qcom.c | 24 ++++++++++++++++++++++--
> 1 file changed, 22 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
> index 6afb8498b8c2..cc6380ebb145 100644
> --- a/drivers/ufs/host/ufs-qcom.c
> +++ b/drivers/ufs/host/ufs-qcom.c
> @@ -2506,7 +2506,7 @@ static unsigned long ufs_qcom_opp_freq_to_clk_freq(struct ufs_hba *hba,
> bool found = false;
>
> opp = dev_pm_opp_find_freq_exact_indexed(hba->dev, freq, 0, true);
> - if (IS_ERR(opp)) {
> + if (IS_ERR_OR_NULL(opp)) {
> dev_err(hba->dev, "Failed to find OPP for exact frequency %lu\n", freq);
> return 0;
> }
> @@ -2535,12 +2535,32 @@ static unsigned long ufs_qcom_opp_freq_to_clk_freq(struct ufs_hba *hba,
>
> static u32 ufs_qcom_freq_to_gear_speed(struct ufs_hba *hba, unsigned long freq)
> {
> - u32 gear = UFS_HS_DONT_CHANGE;
> unsigned long unipro_freq;
> + struct dev_pm_opp *opp;
> + u32 gear = UFS_HS_DONT_CHANGE;
nite: spurious reshuffling
Konrad
next prev parent reply other threads:[~2026-12-02 11:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-02 8:14 [PATCH v2 0/3] " Giri Prasad Goriparthi
2026-12-02 8:14 ` [PATCH v2 1/3] scsi: ufs: " Giri Prasad Goriparthi
2026-12-02 11:20 ` Konrad Dybcio [this message]
2026-12-02 8:14 ` [PATCH v2 2/3] arm64: dts: qcom: hamoa: Add opp-level for UFS gear speed Giri Prasad Goriparthi
2026-12-02 8:15 ` [PATCH v2 3/3] arm64: dts: qcom: talos: " Giri Prasad Goriparthi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ace21a2a-df5a-4158-b962-9f39fab8aa4f@oss.qualcomm.com \
--to=konrad.dybcio@oss.qualcomm.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=abelvesa@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=giri.goriparthi@oss.qualcomm.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=mkp@kernel.org \
--cc=nitin.rawat@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=ziqi.chen@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®