[U-Boot] [RFC PATCH 1/2 v2] nand: allow delayed initialization
Mike Frysinger
vapier at gentoo.org
Sun Oct 3 22:32:46 CEST 2010
On Sunday, October 03, 2010 14:27:13 Wolfgang Denk wrote:
> Mike Frysinger wrote:
> > Many people like the current nand_init() behavior where it is always
> > initialized during boot and the flash size shown, but there are cases
> > where we are willing to forgo this niceness for speed/functionality.
> > So rather than change the default, introduce a delayed config option
> > people may enable. This way the nand is only poked when someone tries
> > to actually use it.
> >
> > extern void nand_init(void);
> >
> > +#ifdef CONFIG_SYS_NAND_DELAYED_INIT
> > +# define nand_delayed_init() nand_init()
> > +#else
> > +# define nand_delayed_init() do { } while (0)
> > +#endif
>
> 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.
> 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.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20101003/f2169123/attachment.pgp
More information about the U-Boot
mailing list