Search Linux Wireless

Re: [RFC PATCH] brcmfmac: add 43751 SDIO ids and initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 14/03/2023 08:27, Ulf Hansson wrote:

> On Mon, 13 Mar 2023 at 22:42, Marc Gonzalez wrote:
>>
>> On 13/03/2023 21:04, Martin Blumenstingl wrote:
>>
>>> On Mon, Mar 13, 2023 at 6:09 PM Marc Gonzalez wrote:
>>> [...]
>>>> QUESTION:
>>>> It's not clear to me why we sleep twice for host->ios.power_delay_ms?
>>>
>>> I'm not sure but I think host->ios.power_delay_ms is independent from
>>> the post-power-on-delay-ms property of "mmc-pwrseq-simple".
>>
>> They are distinct indeed (the props have the same name & similar purpose though).
> 
> Correct.
> 
>>
>> host->ios.power_delay_ms is set via:
>>
>> drivers/mmc/core/host.c:        device_property_read_u32(dev, "post-power-on-delay-ms",
> 
> This is a property that may be specified in the host's OF node. See
> Documentation/devicetree/bindings/mmc/mmc-controller.yaml.
> 
>> drivers/mmc/core/host.c-                                 &host->ios.power_delay_ms);
> 
> Note that the default value is set to 10 ms, in mmc_alloc_host(). So,
> if you need a different value, that can be specified in DT.
> 
>>
>>
>> pwrseq->post_power_on_delay_ms is set via:
>>
>> drivers/mmc/core/pwrseq_simple.c:       device_property_read_u32(dev, "post-power-on-delay-ms",
> 
> This is a property that may be specified in the pwrseq OF node. See
> Documentation/devicetree/bindings/mmc/mmc-pwrseq-simple.yaml.
> 
>> drivers/mmc/core/pwrseq_simple.c-                                &pwrseq->post_power_on_delay_ms);
>>
>>
>> However, they are both used to delay mmc_power_up(),
>> and the host delay is used to sleep twice, which I
>> found confusing ;)
> 
> It's certainly a bit hairy to follow, but I think you have understood
> things correctly.
> 
>>
>> Regards
>>
> 
> Looks like you are getting closer to the solution, at least for the
> first step to make sure the SDIO card is getting detected properly.
> Nice!

What I'm confused about is:

Why would I specify the delay in the host rather than in the pwrseq?

I'll have to study mmc_power_up() a bit more ;)

Regards




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux