
Dear Mike Frysinger,
In message 201010031632.47732.vapier@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