[U-Boot] [RFC PATCH 1/2 v2] nand: allow delayed initialization
Wolfgang Denk
wd at denx.de
Sun Oct 3 23:40:32 CEST 2010
Dear Mike Frysinger,
In message <201010031632.47732.vapier at gentoo.org> you wrote:
>
> > Would it not be esier to rename your nand_delayed_init() into
> > nand_init(), and add a "#ifndef CONFIG_SYS_NAND_DELAYED_INIT" around
> > the current call to nand_init()?
>
> nand_init() cant handle being called multiple times. and i need to add more
> nand_init() points that only apply to when things are delayed. so when
> delayed init is not enabled (the default), there is no change in compiled code
> size.
Well, you have this in your new nand_init() code:
+ static uint8_t initialized;
+ if (initialized)
+ return;
+ initialized = 1;
Why cannot we call nand_init() multiple times, then?
> > Question: is there a risk of problems with boards that have the
> > environment in NAND?
>
> that's why my patch adds delayed init points to the major nand env entry
> points. my understanding is that these must be called before the env
> read/write funcs may be called.
OK, just wanted to make sure.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
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
"Everybody is talking about the weather but nobody does anything
about it." - Mark Twain
More information about the U-Boot
mailing list