[U-Boot] [PATCH 1/4] spl: nand: simple: replace readb() with chip specific read_buf()

Albert ARIBAUD albert.u.boot at aribaud.net
Thu Jul 16 16:12:39 CEST 2015


Hello Vladimir,

On Thu, 16 Jul 2015 16:48:26 +0300, Vladimir Zapolskiy <vz at mleia.com>
wrote:

(cutting short to the essential point remaining)

> > I personally don't think this is the right way; nand_simple.c should be
> > left unchanged and the board should simply not use it since it does not
> > have a simple NAND controller, and instead it should provide its own
> > nand_spl_load_image().
> 
> For me an alternative change to the proposed one is to duplicate
> nand_spl_simple.c functionality in LPC32xx SLC NAND driver. From
> maintenance point of view this is not the best thing to do IMHO.

You're right that some of the functionality present in nand_simple.c is
duplicated elsewhere; however, that functionality is not the one specific
to nand_simple; actually, it is nand_spl_load_image(), the overall load
functionality which should be in no driver at all but of which I see ten
incarnations in ten drivers.

There should be only one nand_spl_load_image(), in its own file, with
placeholders for driver-specific actions such as page read, bad page
check, etc. One day, maybe, there will be a patch for that.

Anyway: you propose changes in the design of the NAND subsystem so that
the SLC controller driver can use the "simple" model, while I think the
SLC controller is not "simple" so it should not be managed as one. This
dilemma is about the NAND subsystem design, which is waaaay outside my
province -- hence my deferring to Scott, who will decide which way this
should go.

> > But hey, I'm not then NAND custodian. Scott: your call. :)
> 
> Anyway thank you for review and comments.

You're welcome!

> --
> With best wishes,
> Vladimir

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list