[U-Boot-Users] U-Boot and Nand Flash

Hello All,
I'm working on a new port of U-Boot to a custom board and have a few questions.
Is Nand flash actually supported by U-Boot? I've been looking through the sources and could not find any references to Nand flash. I don't believe that Nand flash is supported but wanted to make sure prior to jumping in.
Also, it seems like all of the code that would access flash, does it simply by reading from the address that the flash is located at. Although, this works for other flash types (ie. Intel Strataflash) this will not work for Nand flash.
Would there be any objection to adding a read_flash function to the flash drivers so that the type of flash being used is generic?
The nand flash driver that I write will be cpu/ppc4xx/440ep_ndfc.c as the 440ep has a Nand Flash Controller on it in addition to the board/x/flash.c that contains the flash protection and serial reading code.
I want to eventually get patches to all the work to get the board and processor working back into U-Boot so please let me know if I should be doing any of the above items in a different manner.
Regards,

In message 963b3387040908144747363b14@mail.gmail.com you wrote:
Is Nand flash actually supported by U-Boot? I've been looking through
Yes, it is.
the sources and could not find any references to Nand flash. I don't believe that
Nand flash is
supported but wanted to make sure prior to jumping in.
Argh... Please look again. It's so obvious rthat I cannot imagine how you missed it. Guess what all these things are about:
-> ls */*nand* common/cmd_nand.c common/env_nand.c doc/README.nand
Also, it seems like all of the code that would access flash, does it simply by reading from the address that the flash is located at. Although, this works for other flash types (ie. Intel Strataflash) this will not work for Nand flash.
Please look again.
Would there be any objection to adding a read_flash function to the flash drivers so that the type of flash being used is generic?
Yes, there would be, as no such change is necessary. Everything is working fine as is.
The nand flash driver that I write will be cpu/ppc4xx/440ep_ndfc.c as the 440ep has a Nand Flash Controller on it in addition to the board/x/flash.c that contains the flash protection and serial reading code.
Make sure not to mix up CPU specific and generic code.
PLEASE CHECK FIRST WHAT ALREADY EXISTS, and TRY TO UNDERSTAND this code.
I want to eventually get patches to all the work to get the board and processor working back into U-Boot so please let me know if I should be doing any of the above items in a different manner.
Yes. Please read the code first. I mean: _really_ read it.
Best regards,
Wolfgang Denk
participants (2)
-
Bradley Remedios
-
Wolfgang Denk