From: Nitin Rawat <quic_nitirawa@quicinc.com>
To: "Peter Wang (王信友)" <peter.wang@mediatek.com>,
"avri.altman@wdc.com" <avri.altman@wdc.com>,
"beanhuo@micron.com" <beanhuo@micron.com>,
"robh@kernel.org" <robh@kernel.org>,
"bvanassche@acm.org" <bvanassche@acm.org>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"mani@kernel.org" <mani@kernel.org>,
"James.Bottomley@HansenPartnership.com"
<James.Bottomley@HansenPartnership.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V1 3/3] scsi: ufs: qcom: Add support to disable UFS LPM Feature
Date: Wed, 23 Apr 2025 11:54:42 +0530 [thread overview]
Message-ID: <e7717264-a975-475b-8db3-be360e0edd6f@quicinc.com> (raw)
In-Reply-To: <070f15425ba2535a0bb165d61243dc3e3f63d672.camel@mediatek.com>
On 4/23/2025 10:30 AM, Peter Wang (王信友) wrote:
> On Thu, 2025-04-17 at 18:16 +0530, Nitin Rawat wrote:
>>
>> External email : Please do not click links or open attachments until
>> you have verified the sender or the content.
>>
>>
>> There are emulation FPGA platforms or other platforms where UFS low
>> power mode is either unsupported or power efficiency is not a
>> critical
>> requirement.
>>
>> Disable all low power mode UFS feature based on the "disable-lpm"
>> device
>> tree property parsed in platform driver.
>>
>> Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
>> ---
>> drivers/ufs/host/ufs-qcom.c | 15 ++++++++-------
>> 1 file changed, 8 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-
>> qcom.c
>> index 1b37449fbffc..1024edf36b68 100644
>> --- a/drivers/ufs/host/ufs-qcom.c
>> +++ b/drivers/ufs/host/ufs-qcom.c
>> @@ -1014,13 +1014,14 @@ static void ufs_qcom_set_host_caps(struct
>> ufs_hba *hba)
>>
>> static void ufs_qcom_set_caps(struct ufs_hba *hba)
>> {
>> - hba->caps |= UFSHCD_CAP_CLK_GATING |
>> UFSHCD_CAP_HIBERN8_WITH_CLK_GATING;
>> - hba->caps |= UFSHCD_CAP_CLK_SCALING |
>> UFSHCD_CAP_WB_WITH_CLK_SCALING;
>> - hba->caps |= UFSHCD_CAP_AUTO_BKOPS_SUSPEND;
>> - hba->caps |= UFSHCD_CAP_WB_EN;
>> - hba->caps |= UFSHCD_CAP_AGGR_POWER_COLLAPSE;
>> - hba->caps |= UFSHCD_CAP_RPM_AUTOSUSPEND;
>> -
>> + if (!hba->disable_lpm) {
>> + hba->caps |= UFSHCD_CAP_CLK_GATING |
>> UFSHCD_CAP_HIBERN8_WITH_CLK_GATING;
>> + hba->caps |= UFSHCD_CAP_CLK_SCALING |
>> UFSHCD_CAP_WB_WITH_CLK_SCALING;
>> + hba->caps |= UFSHCD_CAP_AUTO_BKOPS_SUSPEND;
>> + hba->caps |= UFSHCD_CAP_WB_EN;
>>
>
> Hi, Nitin,
>
> If hba->disable_lpm is true, WB should enable?
> Normally, you don't care about low power, so why wouldn't you enable
> WB?
>
Hi Peter,
Thanks for review. Agree with you.
I will update this in next patchset.
Regards,
Nitin
> Thanks.
> Peter
>
>
>
>> + hba->caps |= UFSHCD_CAP_AGGR_POWER_COLLAPSE;
>> + hba->caps |= UFSHCD_CAP_RPM_AUTOSUSPEND;
>> + }
>> ufs_qcom_set_host_caps(hba);
>> }
>>
>> --
>> 2.48.1
>>
>
next prev parent reply other threads:[~2025-04-23 6:25 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-17 12:46 [PATCH V1 0/3] Add support to disable UFS LPM Nitin Rawat
2025-04-17 12:46 ` [PATCH V1 1/3] scsi: ufs: dt-bindings: Document UFS Disable LPM property Nitin Rawat
2025-04-17 12:46 ` [PATCH V1 2/3] scsi: ufs: pltfrm: Add parsing support for disable " Nitin Rawat
2025-04-18 4:43 ` Mukesh Kumar Savaliya
2025-04-22 12:38 ` Rob Herring
2025-04-17 12:46 ` [PATCH V1 3/3] scsi: ufs: qcom: Add support to disable UFS LPM Feature Nitin Rawat
2025-04-22 12:45 ` Rob Herring
2025-04-22 19:44 ` Nitin Rawat
2025-04-23 13:56 ` Rob Herring
2025-04-25 20:22 ` Nitin Rawat
2025-04-23 5:00 ` Peter Wang (王信友)
2025-04-23 6:24 ` Nitin Rawat [this message]
2025-04-17 21:36 ` [PATCH V1 0/3] Add support to disable UFS LPM Bart Van Assche
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=e7717264-a975-475b-8db3-be360e0edd6f@quicinc.com \
--to=quic_nitirawa@quicinc.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.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=martin.petersen@oracle.com \
--cc=peter.wang@mediatek.com \
--cc=robh@kernel.org \
/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