U-Boot supports NAND flashes hooked up a variety of ways. It may be via the asynchronous memory bank (such as the CF/NAND card) or the on-chip NAND controller .
In terms of the command line interface, the nand
command is the interface to all NAND flash operations. It allows you to read/write a sequential range of bytes as well as query the NAND flash. Bad block handling is optionally supported.
In terms of U-Boot code, U-Boot provides similar infrastructure to the Linux kernel MTD layer. People who wish to hook up their own NAND flash in their way just has to write the backend driver.
U-BOOT中NAND FLASH操作的代码分析 http://embedlinux.ycool.com/post.2945962.html
NAND Flash的驱动程序设计 http://www.51kaifa.com/html/jswz/200903/read-10718.htm
如何编写linux下nand flash驱动 http://www.rosoo.net/a/linux/201005/9435.html
Nand flash工作原理 http://blog.sina.com.cn/s/blog_699eead70100ltx3.htmlNAND technical view http://www.linux-mtd.infradead.org/archive/tech/nand.html NAND Flash and U-Boot http://docs.blackfin.uclinux.org/doku.php?id=bootloaders:u-boot:nand-flashu-boot nand命令部分用法如下:
nand device 0 //(1)
nand erase 0x100000 0x200000 //(2)
nand write 0x20000000 0x100000 0x200000 -//(3)
nand read 0x20000000 0x100000 0x200000 -//(4)
(1) 选择nand的device 0空间,
(2) 从1M处开始擦写Nand Flash,擦写2M大小的空间,
(3) 将SDRAM中的0x20000000处开始的内容,烧写到Nand Flash的0x100000处开始的2M空间内,
(4) 将Nand Flash的0x100000处开始的2M空间内容,拷贝到SDRAM中0x20000000处开始的地方。