[U-Boot] [PATCH] mtdparts: Call nand_init() during mtdparts_init().
Scott Wood
scottwood at freescale.com
Sat Oct 16 00:35:33 CEST 2010
On Sat, 16 Oct 2010 00:17:01 +0200
Wolfgang Denk <wd at denx.de> wrote:
> Dear Scott Wood,
>
> In message <20101015164801.3fd031b7 at udp111988uds.am.freescale.net> you wrote:
> >
> > > Why do we need an explicit call to nand_init() at all?
> > >
> > > Why cannot the NAND routines check internally if they have been
> > > initialized yet, and run nand_init() if and when needed?
> >
> > mtdparts doesn't make any calls directly to NAND routines (other than
> > this new call to nand_init). It looks for registered MTD devices.
> >
> > Until nand_init runs, you won't have any NAND mtd devices -- and no
> > NAND function will be invoked where such initialization could be done.
>
> This looks like a broken design to me.
What would you rather see in its place?
> Assume we add this call here; would it then not also be needed in the
> 'static' version of mtdparts_init() in "common/cmd_jffs2.c" (whatever
> 'static' is supposed to mean) ?
Yes, it seems so. Is there a good reason why jffs2 has its own
implementation of this stuff?
yaffs_StartUp is in a similar situation.
-Scott
More information about the U-Boot
mailing list