[U-Boot] [RESEND 2/2] mmc:fix Call mmc_init() when executing mmc_get_dev()

Andy Fleming afleming at gmail.com
Wed May 9 00:33:46 CEST 2012


On Fri, Apr 20, 2012 at 2:09 AM, Lukasz Majewski <l.majewski at samsung.com> wrote:
> Hi, Lei
>
>> I'm concerning with this adding init here.
>> Since not every platform mount with emmc as boot device, and what they
>> need is booting fast.
>
> If I remember correctly, u-boot policy is to not initialize the mmc
> until it is needed (i.e. command is executed).
> So the extra init won't be executed until fatls or mmc is executed.
>
>> If you order them to initialize all mmc/sd at
>> mmc register stage, this adding booting time may not be the one they
>> want to see.
>
> I think that booting time will not increase, because in the mmc_init()
> there is a check:
>
>        if (mmc->has_init)
>                return 0;

This right here is something we need to discuss as a community. On the
one hand, I can see the desire to not do unnecessary initialization
every time we issue a command. On the other hand, we need some way of
dealing with the possibility that the cards that were in the slot when
we booted are no longer there (or that empty slots have now been
filled).

I'm now taking comments...

Andy


More information about the U-Boot mailing list