[U-Boot] [PATCH] mtdparts: Call nand_init() during mtdparts_init().
Mike Frysinger
vapier at gentoo.org
Fri Oct 15 22:08:29 CEST 2010
On Friday, October 15, 2010 15:36:40 Wolfgang Denk wrote:
> Scott Wood wrote:
> > The mtdparts code depends on the devices referred to by
> > partition specs actually existing, both for error checking,
> > when the spread feature is used, for bad block checking.
> >
> > @@ -1711,6 +1707,7 @@ int mtdparts_init(void)
> > memset(last_ids, 0, MTDIDS_MAXLEN);
> > memset(last_parts, 0, MTDPARTS_MAXLEN);
> > memset(last_partition, 0, PARTITION_MAXLEN);
> >
> > + nand_init();
> > initialized = 1;
> > }
>
> I don't like this either. I don't want to see a nand_init() for
> systems that have no NAND at all (not even an empty one).
i disagree ... sprinkling #ifdef's throughout the code makes it a lot harder
to read, maintain, and validate across multiple configurations. you're
suggesting we do:
#ifdef CONFIG_CMD_NAND
nand_init();
#endif
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.
-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/20101015/eaabdd58/attachment.pgp
More information about the U-Boot
mailing list