[U-Boot] [PATCH] mtdparts: Call nand_init() during mtdparts_init().
Scott Wood
scottwood at freescale.com
Fri Oct 15 23:48:01 CEST 2010
On Fri, 15 Oct 2010 23:39:52 +0200
Wolfgang Denk <wd at denx.de> wrote:
> Dear Mike Frysinger,
>
> > it makes more sense to me to hide this in the header (which Scott has done)>
> > and let the compiler/code optimize dead crap away.
>
> 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.
-Scott
More information about the U-Boot
mailing list