This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

uboot中读写nand慢问题

使用SDK6.0,u-boot-2013。发现uboot阶段nand读操作比内核慢很多。看到帖子说打算使用DMA和prefetch的patch。

打上后出现uboot起不来的现象。

卡死到SPL阶段读取u-boot.img并跳转执行u-boot。如果我使用原来的读接口函数nand_read_buf,u-boot可以正常启动。
-#ifdef CONFIG_SPL_BUILD
+#ifdef CONFIG_POLARIS_PREFETCH
if (nand->options & NAND_BUSWIDTH_16)
- nand->read_buf = nand_read_buf16;
+ nand->read_buf = read_buf_pref;
else
- nand->read_buf = nand_read_buf;
- nand->dev_ready = omap_spl_dev_ready;
+ nand->read_buf = read_buf_pref;
#endif
+#ifdef CONFIG_SPL_BUILD
+ nand->dev_ready = omap_spl_dev_ready;
+#endif
应该是没有读到内容,因为解析读的镜像,发现magic是全F,LOG如下:

before spl_parse_image_header 1
mkimage signature not found - ih_magic = ffffffff
before nand_spl_load_image:-- spl_image.size = 0x32000

请问是不是还需要做什么修改?read_buf_pref中使用的这个FIFO_IOADDR定义是根据什么来的?
#define FIFO_IOADDR 0x100000 // Prefetch IO addr