nand启动优化

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

nand启动优化

2,501 次查看
3282615974
Contributor I

硬件平台:imx6ul +256DDR(单颗) +nand flash 128M

软件:3.14.38内核+UBI 文件系统

一、目前启动时间比较慢(4.5秒)

                    目前我这边经过优化从上电到程序起来界面出现4.5S左右,这主要时间耗在,uboot起来0.5左右,加载内核(3.5M)在1秒左右,内核解压到应用程序界面输出3秒左右,(竞品在2.5左右,不过他们是裸系统在跑),目前我们自己已经把所有的打印信息全部不输出,还有内核也没有可以裁减的余地,现在唯一还没有确认的是uboot加载内核,是不是还有优化的空间。

=nand启动慢是因为NAND技术上面的先天不足,以下帖子你们可以参考一下。

https://community.nxp.com/docs/DOC-95061

优化方案1. enable the MMU and SDMA in uboot

优化方案2. 看一下你们的NAND支持EDO模式吗?如果支持,请按下面的方法去做,可以提升30%

Some NAND flash support the EDO feature, according to the device feature mode, the NAND flash can be set different clock frequency.  Here will describe how to calculate the NAND working clock.

   The NAND clock is divider from the GPMI source clock, can be program in setup_gpmi_nand().  The  divider was configured in register GPMI_TIMING0, the NAND clock can get from the following:

          NANDCLK=GPMICLK/(DATA_HOLD+DATA_SETUP)

 

   NAND Clock will affect the speed a lot, for the NAND chipsets which support the EDO, the nand speed will be set automatically. For those doesn’t support EDO NAND chip, the usr should take care those setting manually. There is also a patch for enable EDO mode and set NAND clock automatically.

              0008-NAND-configure-as-EDO-mode-5.patch

 

    Besides above, there are two other patches to improve the speed about 30%, 0009-For-nand-page-align-read-include-read-offset-and-siz.patch enabled the cache read(Note: please make sure the NAND chipset support cache read), it will reduce the unnecessary command transfer between the CPU and NAND, 0010-If-possible-directly-use-user-buffer-as-BCH-nand-buf.patch remove some unnecessary memcpy.

以上是工程师获得的回复,现在想问下 0008-NAND-configure-as-EDO-mode-5.patch, 0009-For-nand-page-align-read-include-read-offset-and-siz.patch以及0010-If-possible-directly-use-user-buffer-as-BCH-nand-buf.patch这三个补丁哪里可以找到?

标签 (1)
0 项奖励
回复
3 回复数

2,066 次查看
志林韩
Contributor I

你好,你的uboot启动时间0.5s是怎么做到的?内核镜像3.5M有包含initramfs吗?

0 项奖励
回复

2,066 次查看
jimmychan
NXP TechSupport
NXP TechSupport
0 项奖励
回复

2,066 次查看
3282615974
Contributor I

jimmychan,

你好,我发现0009-For-nand-page-align-read-include-read-offset-and-siz.patch这个补丁与uboot2015.04并不适用,我按照fast_nand里面的0009-For-nand-page-align-read-include-read-offset-and-siz.patch这个补丁包做了修改之后,虽然可以完整的读取到内核,速度上也只快了30ms,但是却无法启动,附件是我改后的文件。

不知道您那边是否有其他版本的补丁呢?或者能否提供一些指导呢?

0 项奖励
回复