[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4aaa09b8-e944-4d66-a681-a3659fc203cc@oss.qualcomm.com>
Date: Thu, 7 Aug 2025 13:06:55 +0200
From: Konrad Dybcio <konrad.dybcio@....qualcomm.com>
To: Manivannan Sadhasivam <mani@...nel.org>
Cc: Palash Kambar <quic_pkambar@...cinc.com>,
James.Bottomley@...senpartnership.com, martin.petersen@...cle.com,
linux-arm-msm@...r.kernel.org, linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org, quic_nitirawa@...cinc.com
Subject: Re: [PATCH v1] ufs: ufs-qcom: Align programming sequence of Shared
ICE for UFS controller v5
On 8/6/25 7:39 PM, Manivannan Sadhasivam wrote:
> On Wed, Aug 06, 2025 at 02:56:43PM GMT, Konrad Dybcio wrote:
>> On 8/6/25 1:14 PM, Manivannan Sadhasivam wrote:
>>> On Wed, Aug 06, 2025 at 12:04:09PM GMT, Palash Kambar wrote:
>>>> Disable of AES core in Shared ICE is not supported during power
>>>> collapse for UFS Host Controller V5.0.
>>>>
>>>> Hence follow below steps to reset the ICE upon exiting power collapse
>>>> and align with Hw programming guide.
>>>>
>>>> a. Write 0x18 to UFS_MEM_ICE_CFG
>>>> b. Write 0x0 to UFS_MEM_ICE_CFG
>>>>
>>>> Signed-off-by: Palash Kambar <quic_pkambar@...cinc.com>
>>>> ---
>>
>> [...]
>>
>>>
>>>> + ufshcd_readl(hba, UFS_MEM_ICE);
>>>> + ufshcd_writel(hba, 0x0, UFS_MEM_ICE);
>>>> + ufshcd_readl(hba, UFS_MEM_ICE);
>>>
>>> Why do you need readl()? Writes to device memory won't get reordered.
>>
>> I'm not sure if we need a delay between them, otherwise they'll happen
>> within a couple cycles of each other which may not be enough since this
>> is a synchronous reset and the clock period is 20-50ns when running at
>> XO (19.2 / 38.4 MHz) rate
>>
>
> IIUC, the second register write is just reenabling the mask, so there is no
Yes
> delay required between these two writes. If that's not true, and if there is a
Yes
> delay required, then do:
We don't know if it's required, the HPG makes no effort to clarify it,
but I would expect it's probably not instantaneous
>
> ufshcd_writel(0x18);
> ufshcd_readl();
> usleep()/msleep();
> ufshcd_write(0x0);
You'd still need the second readl to make sure the de-assertion has
gone through before proceeding
Konrad
Powered by blists - more mailing lists