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

Ulf Hansson ulf.hansson at linaro.org
Tue Mar 14 00:27:45 PDT 2023


On Mon, 13 Mar 2023 at 22:42, Marc Gonzalez <marc.w.gonzalez at free.fr> 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!

Kind regards
Uffe



More information about the linux-amlogic mailing list