[U-Boot] [RFC/PATCH 1/4] Enable multi chip support in the NAND layer

Wolfgang Grandegger wg at grandegger.com
Fri Jan 16 18:15:50 CET 2009


Wolfgang Denk wrote:
> Dear Wolfgang,
> 
> In message <49703E5B.1080604 at grandegger.com> you wrote:
>> Yep, in the meantime I realized that it's already pre-set in
>> include/linux/mtd/nand.h:
>>
>>   /* The maximum number of NAND chips in an array */
>>   #ifndef NAND_MAX_CHIPS
>>   #define NAND_MAX_CHIPS          8
>>   #endif
>>
>> but most (if not all) boards set it to 1.
> 
> So we should change the default setting to 1, and change it only where
> needed.

Actually, none of the boards use multi-chip support (NAND_MAX_CHIPS >
1). The bamboo and the DU440 define

  #define NAND_MAX_CHIPS          CONFIG_SYS_MAX_NAND_DEVICE

but that's bogus and did not work yet anyhow.

>> But at that occasion, I think the name should be changed to
>> CONFIG_SYS_NAND_MAX_CHIPS, right?
> 
> Right.

OK, I will prepare a patch removing all NAND_MAX_CHIPS from the board
config files, rename if to CONFIG_SYS_NAND_MAX_CHIPS and define a
default of 1 for the legacy and the new MTD NAND layer.

Wolfgang.


More information about the U-Boot mailing list