
I've got v2015.04-rc4 running on my custom am335x (600MHz) based board. My 8-bit NAND chip:
[17.297793 0.004021] omap-gpmc 50000000.gpmc: GPMC revision 6.0 [17.303850 0.006057] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda [17.309706 0.005856] nand: Micron MT29F2G08ABAEAWP [17.312823 0.003117] nand: 256MiB, SLC, page size: 2048, OOB size: 64 [17.317311 0.004488] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
I need to load about 17Mb FIT image from UBIFS partition. In Linux it takes about 7 seconds:
# time cp /mnt/kernel-fit.itb /tmp/ real 0m 7.12s user 0m 0.00s sys 0m 6.89s
But U-Boot needs about twice the time:
[3.592231 0.004182] Booting from nand ... [4.905171 1.312940] UBI: default fastmap pool size: 100 [4.912605 0.007434] UBI: default fastmap WL pool size: 25 [4.919754 0.007149] UBI: attaching mtd1 to ubi0 [5.354450 0.434696] UBI: attached by fastmap [5.360417 0.005967] UBI: fastmap pool size: 100 [5.365765 0.005348] UBI: fastmap WL pool size: 25 [5.398237 0.032472] UBI: attached mtd1 (name "mtd=5", size 253 MiB) to ubi0 [5.404582 0.006345] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes [5.409969 0.005387] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512 [5.415245 0.005276] UBI: VID header offset: 512 (aligned 512), data offset: 2048 [5.420208 0.004963] UBI: good PEBs: 2029, bad PEBs: 0, corrupted PEBs: 0 [5.424650 0.004442] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128 [5.430645 0.005995] UBI: max/mean erase counter: 25/18, WL threshold: 4096, image sequence number: 1052535214 [5.438221 0.007576] UBI: available PEBs: 1527, total reserved PEBs: 502, PEBs reserved for bad PEB handling: 40 [5.810683 0.372462] Loading file 'kernel-fit.itb' to addr 0x84000000 with size 17651408 (0x010d56d0)... [19.013472 13.202789] Done
13 seconds are not affected by CONFIG_NAND_OMAP_GPMC_PREFETCH. Am I missing some configs?
#ifdef CONFIG_NAND #define CONFIG_NAND_OMAP_GPMC #define CONFIG_NAND_OMAP_GPMC_PREFETCH #define CONFIG_NAND_OMAP_ELM #define CONFIG_SYS_NAND_5_ADDR_CYCLE #define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \ CONFIG_SYS_NAND_PAGE_SIZE) #define CONFIG_SYS_NAND_PAGE_SIZE 2048 #define CONFIG_SYS_NAND_OOBSIZE 64 #define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024) #define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS #define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \ 10, 11, 12, 13, 14, 15, 16, 17, \ 18, 19, 20, 21, 22, 23, 24, 25, \ 26, 27, 28, 29, 30, 31, 32, 33, \ 34, 35, 36, 37, 38, 39, 40, 41, \ 42, 43, 44, 45, 46, 47, 48, 49, \ 50, 51, 52, 53, 54, 55, 56, 57, }
#define CONFIG_SYS_NAND_ECCSIZE 512 #define CONFIG_SYS_NAND_ECCBYTES 14 #define CONFIG_SYS_NAND_ONFI_DETECTION #define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x00080000 #endif #endif
Yegor