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

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

 



On Tue, 14 Mar 2023 at 09:33, Marc Gonzalez <marc.w.gonzalez@xxxxxxx> wrote:
>
> 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?

If the delay is to manage vmmc and vqmmc, which is somewhat part of
the generic specifications (SD/MMC), then it should be described in
the host's node.

A pwrseq is something special, which is also platform and device
specific (the SDIO device). If the delays correspond to this, it
should be part of the pwrseq node.

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

:-)

Kind regards
Uffe




[Index of Archives]     [Linux Memonry Technology]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux