From: Nitin Rawat <quic_nitirawa@quicinc.com>
To: Avri Altman <Avri.Altman@sandisk.com>,
"mani@kernel.org" <mani@kernel.org>,
"James.Bottomley@HansenPartnership.com"
<James.Bottomley@HansenPartnership.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"bvanassche@acm.org" <bvanassche@acm.org>,
"neil.armstrong@linaro.org" <neil.armstrong@linaro.org>,
"konrad.dybcio@oss.qualcomm.com" <konrad.dybcio@oss.qualcomm.com>
Cc: "linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH V1 2/2] scsi: ufs: qcom: Enable QUnipro Internal Clock Gating
Date: Fri, 4 Jul 2025 09:52:45 +0530 [thread overview]
Message-ID: <8e82f971-8a1f-45c9-8f8a-9ef17f8c1a70@quicinc.com> (raw)
In-Reply-To: <PH7PR16MB61965FA0A8DFB0877CE51690E543A@PH7PR16MB6196.namprd16.prod.outlook.com>
On 7/3/2025 12:13 PM, Avri Altman wrote:
>> +/**
>> + * ufshcd_dme_rmw - get modify set a dme attribute
>> + * @hba - per adapter instance
>> + * @mask - mask to apply on read value
>> + * @val - actual value to write
>> + * @attr - dme attribute
>> + */
>> +static inline int ufshcd_dme_rmw(struct ufs_hba *hba, u32 mask,
>> + u32 val, u32 attr) {
>> + u32 cfg = 0;
>> + int err = 0;
>> +
>> + err = ufshcd_dme_get(hba, UIC_ARG_MIB(attr), &cfg);
>> + if (err)
>> + goto out;
>> +
>> + cfg &= ~mask;
>> + cfg |= (val & mask);
>> +
>> + err = ufshcd_dme_set(hba, UIC_ARG_MIB(attr), cfg);
>> +
>> +out:
>> + return err;
>> +}
> Might be useful to share this with other vendors as well. Maybe in ufshcd-priv.h ?
Sure Avri, I'll move this to ufshcd-priv.h
>
> Thanks,
> Avri
prev parent reply other threads:[~2025-07-04 4:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-02 15:14 [PATCH V1 0/2] scsi: ufs: qcom: Align programming sequence as per HW spec Nitin Rawat
2025-07-02 15:14 ` [PATCH V1 1/2] scsi: ufs: ufs-qcom: Update esi_vec_mask for HW major version >= 6 Nitin Rawat
2025-07-02 15:14 ` [PATCH V1 2/2] scsi: ufs: qcom: Enable QUnipro Internal Clock Gating Nitin Rawat
2025-07-03 6:43 ` Avri Altman
2025-07-04 4:22 ` Nitin Rawat [this message]
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=8e82f971-8a1f-45c9-8f8a-9ef17f8c1a70@quicinc.com \
--to=quic_nitirawa@quicinc.com \
--cc=Avri.Altman@sandisk.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=bvanassche@acm.org \
--cc=konrad.dybcio@oss.qualcomm.com \
--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=neil.armstrong@linaro.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
all inboxes | Powered by JetHome®