[U-Boot] [PATCH v2] NAND: Add 16bit NAND support for the NDFC

Scott Wood scottwood at freescale.com
Tue Jun 7 18:32:00 CEST 2011


On Tue, 7 Jun 2011 08:33:25 -0400
Alex Waterman <awaterman at dawning.com> wrote:

> 
> >> +#ifdef CONFIG_SYS_NDFC_16BIT
> >>  	/* Shift the offset from byte addressing to word addressing. */
> >> -	if (this->options & NAND_BUSWIDTH_16)
> >> -		offs >>= 1;
> >> +	offs >>= 1;
> >> +#endif
> > 
> > This is not an NDFC-specific file.
> 
> Oh, yeah, I see. This should not have been swapped to a preprocessor
> condition. Could we make a general define for 16 bit NAND not just limited
> to the NDFC? Or would you rather just have the extra if condition despite
> the extra code space it takes up?

I'm fine with either way.  If you make it compile-time, make sure you update
all boards that use SPL with 16-bit, and document that it's limited to SPL
(unless you really want to update all the boards using 16-bit, SPL or not,
and update the main NAND code to take advantage of this, and there's enough
advantage to be gained to make it worthwhile).

-Scott



More information about the U-Boot mailing list