From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Fri, 6 Oct 2006 21:40:21 +0200 Subject: [U-Boot-Users] nand flash controller on 440ep/epx In-Reply-To: <1628E43D99629C46988BE46087A3FBB9729A26@ep-01.EmbeddedPlanet.local> References: <1628E43D99629C46988BE46087A3FBB9729A26@ep-01.EmbeddedPlanet.local> Message-ID: <200610062140.21393.sr@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Jeff, On Friday 06 October 2006 19:56, Jeff Mann wrote: > It appears that the nand flash controller support recently added to > u-boot for the ppc400ep/epx only supports the use of a single nand chip. Yes. That's the current status. > The nand flash controller supports up to four devices using chip selects > 0-3. I am working on making two devices work right now for my use, but I > would like to update the flash-controller support. I am open for > comments on this. > > What I think I need to do is add an #config CFG_440_USENANDCONTROLLER > option and an entry into the nand_chip struct for holding the chip > select numbers for each chip. Then in addition to configuring an array > of nand bases {CFG_NAND_BASE} (which would all be the same address > because it is the address of the nand controller), the chip selects are > put in a configured array and put into the nand_chip nand struct. The > read and write functions would then need to be updated to enable the > right chip select in the nand controller config register too. > > Comments? Suggestions? What am I missing? 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. 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. What do you think? Best regards, Stefan