Some customer will use NAND flash as the storage device, also in auto application field, the fast boot is also necessary, so how to make the read speed faster is a question. FSL provide some patches for fast boot, they’re also suitable for NAND fast boot. These patch mainly enable the MMU and SDMA in uboot, some part of the patches is special for MMC.
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:
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.
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.
Original Attachment has been moved to: fast_nand.zip