How to speed up zImage transfer from qspi flash to SRAM?


Hello everyone,

I am trying to speed up the boot time by reducing the time it takes to copy a 16MB zImage (compressed) from QSPI (Micron MT25QL01GBBB8ESF-0AAT) flash to SRAM. I am currently getting 3.5s to transfer ~16MB or 4.5MBps. Has anyone been able to make the copy faster? I already spent a lot of time looking at the code and QSPI flash datasheet. Any help is really appreciated.

It looks like U-BOOT already uses fast-read with Quad speed enabled (#define CONFIG_SPI_FLASH_QUAD (1)). The datasheet doesn’t mention the Read speed on the Micron flash, but it does mention that Program/Write speed = 2MB/s and Erase speed = 400KB/s w/ 64KB sector. The datasheet talks about Double Transfer Rate and XIP, but I am not sure if that would help shorten the boot time.

Below is my boot-up capture…

[Thu Jul 26 18:35:44.504 2018]
[Thu Jul 26 18:35:44.518 2018] Hit any key to stop autoboot: 1 0
[Thu Jul 26 18:35:45.528 2018] Setting bus speed to 400000 Hz
[Thu Jul 26 18:35:45.567 2018] ## Starting application at 0x3FF79508 …
[Thu Jul 26 18:35:45.567 2018] ## Application terminated, rc = 0x0
[Thu Jul 26 18:35:46.556 2018] SF: Detected N25Q00 with page size 65536, total: 134217728

Flash2SRAM copy started
[Thu Jul 26 18:35:46.584 2018] SF: Detected N25Q00 with page size 65536, total: 134217728
[Thu Jul 26 18:35:50.048 2018] ## Flattened Device Tree blob at 00000100

Flash2SRAM copy ended and took ~3.5s

[Thu Jul 26 18:35:50.075 2018] Booting using the fdt blob at 0x00000100
[Thu Jul 26 18:35:50.075 2018] Loading Device Tree to 03ff7000, end 03ffff93 … OK
[Thu Jul 26 18:35:50.091 2018]
[Thu Jul 26 18:35:50.091 2018] Starting kernel …
[Thu Jul 26 18:35:50.091 2018]