[U-Boot] [PATCH] env: mmc/fat/ext4: make sure that the MMC sub-system is initialized before using it

Wolfgang Denk wd at denx.de
Wed Feb 7 08:52:12 UTC 2018


Dear Faiz Abbas,

In message <1517564875-10237-1-git-send-email-faiz_abbas at ti.com> you wrote:
> When booting from a non-MMC device, the MMC sub-system may not be
> initialized when the environment is first accessed.
> We need to make sure that the MMC sub-system is ready in even a non-MMC
> boot case.
> 
> Therefore, initialize mmc during .init() of environment.

Do I understand correctly that you will always initialize the MMC
sub-system if it is a candidate for reading the environment, even
when the environment is read from elsewhere?

In this case I hereby NAK this patch.

U-Boot shall always use lazy initialization and never ever initialize
hardware which it does not really use - see especially item 2 at
[1].

[1] http://www.denx.de/wiki/U-Boot/DesignPrinciples

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The management question ... is not _whether_ to build a pilot  system
and  throw  it away. You _will_ do that. The only question is whether
to plan in advance to build a throwaway, or to promise to deliver the
throwaway to customers.       - Fred Brooks, "The Mythical Man Month"


More information about the U-Boot mailing list