[U-Boot-Users] nand flash controller on 440ep/epx

Jeff Mann MannJ at embeddedplanet.com
Fri Oct 6 22:51:19 CEST 2006


>It seems to me that we are missing a board/cpu specific function to
select a different NAND chip, when the device is changed via the "nand
device x" command.This 440EP(x) specific function would then setup the
NDFC configuration register (NDFC0_CR) to enable the desired NAND chip
select. 

This seems simple enough. In addition to "nand device x" switching, it
would need to be incorporated into nand_init_chip(...) in nand.c before
it calls nand_scan(...). I do not think it has to be board specific, but
rather processor specific. 

>
>And to make it easy I suggest that NAND device 0 represents chips
select 0 and so on... So no need for additional config options or config
arrays.

I origionally consitered this approach. However, as nand would rarely be
on CS 0, it seemed to have additional problems. For example, I have
FLASH on CS 0, a CPLD on CS 3 and NAND on 1 and 3. So, doing
nand_scan(..) at boot would cause problems if all four chip selects were
scanned. On the other hand, a config option like #define
CONFIG_NAND_CS0, etc. could solve this problem.

So, we will need the configuration options:
CONFIG_USE_PPC440_NDFC to select the use of the nand flash controller on
ppc440ep/x/gp boards
CONFIG_NAND_CS0, CONFIG_NAND_CS1, CONFIG_NAND_CS2, CONFIG_NAND_CS3 or 
CONFIG_NAND_CS { ...} to select which chip selects to use

Then we need to assumme that all nand chips use the address set for the
nand controller in 
#define CFG_NAND_BASE CFG_NAND_ADDR

We will either need to set CFG_MAX_NAND_DEVICE to four (if assuming all
CS might me used) or somehow each of the devices in the nand_chip struct
array will need to be identified with a cs. I origionally recommended
adding a variable in the struct for identifying the chip select, but
there are other ways around this. 

So, Stefan, (or Wolfgang) which approach would you prefer I take. I
think that the AMCC sequoia is the only board so far that uses the nand
controller so it is the only board that will need changes.

-Jeff
Embedded Planet






More information about the U-Boot mailing list