Re: [PATCH v5 6/8] scsi: ufs: Add dev ref clock gating wait time support

Can Guo
2020-02-06T02:40:08Z

On 2020-02-06 08:55, Stanley Chu wrote:
> Hi Can,
>
> On Wed, 2020-02-05 at 12:52 +0800, Can Guo wrote:
>
>
>> Hi Stanley,
>>
>> We used to ask vendors about it, 50 is somehow agreed by them. Do you
>> have a
>> better value in mind?
>>
>> For me, I just wanted to give it 10, so that we can directly use
>> usleep_range
>> with it, no need to decide whether to use udelay or usleep_range.
>
> Actually I do not have any value in mind because I guess the 50us here
> is just a margin time added for safety as your comments: "Give it more
> time to be on the safe side".
>
> An example case is that some vendors only specify 1us in
> bRefClkGatingWaitTime, so this 50us may be too long compared to
> device's
> requirement. If such device really needs this additional 50us, it shall
> be specified in bRefClkGatingWaitTime.
>
> So if this additional delay does not have any special reason or not
> mentioned by UFS specification, would you consider move it to vendor
> specific implementations. By this way, it would be more flexible to be
> controlled by vendors or by platforms.
>
> Thanks,
> Stanley
>
>>
>> Thanks,
>> Can Guo.
>>
>> >> &dev_info->model, SD_ASCII_STD);

Hi Stanley,

FYI, the default values in bRefClkGatingWaitTime from vendors are around
50 - 100.

I agree with you. I will just remove the extra delay here and let's
handle it in our own platform drivers.

Thanks,
Can Guo.