Hi Team,
following tests were done with SDK 7.0 on the AM335x EVM.
According to the logs below the prefetch-DMA doesn't work, according to NAND User Guide it should:
http://processors.wiki.ti.com/index.php/Linux_Core_NAND_User%27s_Guide
Could you please help to clarify the issue?
Thanks and regards,
Oleg
Images from ti-sdk-am335x-evm-07.00.00.00
Devive booted, Nand is recognized.
[ 0.000000] Linux version 3.12.10-ti2013.12.01 (jenkins@sdit-build02) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #1 Sun Mar 30 20:55:31 CDT 2014
…
[ 1.698723] ONFI param page 0 valid
[ 1.702470] ONFI flash detected
[ 1.705800] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP), 256MiB, page size: 2048, OOB size: 64
[ 1.717876] omap2-nand: detected x8 NAND flash
[ 1.722584] nand: using OMAP_ECC_BCH8_CODE_HW ECC scheme
[ 1.728232] omap2-nand: using custom ecc layout
[ 1.733299] 10 ofpart partitions found on MTD device omap2-nand.0
[ 1.739745] Creating 10 MTD partitions on "omap2-nand.0":
[ 1.745501] 0x000000000000-0x000000020000 : "NAND.SPL"
[ 1.752845] 0x000000020000-0x000000040000 : "NAND.SPL.backup1"
[ 1.759932] mmc0: new SDIO card at address 0001
[ 1.767449] 0x000000040000-0x000000060000 : "NAND.SPL.backup2"
[ 1.775535] 0x000000060000-0x000000080000 : "NAND.SPL.backup3"
[ 1.783240] 0x000000080000-0x0000000c0000 : "NAND.u-boot-spl-os"
[ 1.791231] 0x0000000c0000-0x0000001c0000 : "NAND.u-boot"
[ 1.799042] 0x0000001c0000-0x0000001e0000 : "NAND.u-boot-env"
[ 1.806541] 0x0000001e0000-0x000000200000 : "NAND.u-boot-env.backup1"
[ 1.814772] 0x000000200000-0x000000a00000 : "NAND.kernel"
[ 1.828433] 0x000000a00000-0x000010000000 : "NAND.file-system"
+added over the kernelconfig the MTD-Tests for performance measurement, it worked.
[ 0.000000] Linux version 3.12.10-ti2013.12.01 (vm@vm-VirtualBox) (gcc version 4.7.3 20130226 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.03-20130313 - Linaro GCC 2013.03) ) #1 Thu Oct 16 10:49:59 CEST 2014
…
root@am335x-evm:~# modprobe mtd_speedtest dev=9
[ 714.976169]
[ 714.977775] =================================================
[ 714.983945] mtd_speedtest: MTD device: 9
[ 714.988503] mtd_speedtest: MTD device size 257949696, eraseblock size 131072, page size 2048, count of eraseblocks 1968, pages per eraseblock 64, OOB size 64
[ 715.006413] mtd_test: scanning for bad eraseblocks
[ 715.215541] mtd_test: scanned 1968 eraseblocks, 0 are bad
[ 716.467579] mtd_speedtest: testing eraseblock write speed
[ 765.110792] mtd_speedtest: eraseblock write speed is 5179 KiB/s
[ 765.117105] mtd_speedtest: testing eraseblock read speed
[ 797.002123] mtd_speedtest: eraseblock read speed is 7901 KiB/s
[ 798.716836] mtd_speedtest: testing page write speed
[ 847.533649] mtd_speedtest: page write speed is 5160 KiB/s
[ 847.539384] mtd_speedtest: testing page read speed
[ 879.519571] mtd_speedtest: page read speed is 7877 KiB/s
[ 881.233702] mtd_speedtest: testing 2 page write speed
[ 929.969635] mtd_speedtest: 2 page write speed is 5169 KiB/s
[ 929.975579] mtd_speedtest: testing 2 page read speed
[ 961.909842] mtd_speedtest: 2 page read speed is 7889 KiB/s
[ 961.915689] mtd_speedtest: Testing erase speed
[ 963.630299] mtd_speedtest: erase speed is 147398 KiB/s
[ 963.635758] mtd_speedtest: Testing 2x multi-block erase speed
[ 964.616548] mtd_speedtest: 2x multi-block erase speed is 258363 KiB/s
[ 964.623398] mtd_speedtest: Testing 4x multi-block erase speed
[ 965.602902] mtd_speedtest: 4x multi-block erase speed is 258628 KiB/s
[ 965.609718] mtd_speedtest: Testing 8x multi-block erase speed
[ 966.588449] mtd_speedtest: 8x multi-block erase speed is 258894 KiB/s
[ 966.595281] mtd_speedtest: Testing 16x multi-block erase speed
[ 967.574070] mtd_speedtest: 16x multi-block erase speed is 258894 KiB/s
[ 967.580972] mtd_speedtest: Testing 32x multi-block erase speed
[ 968.559671] mtd_speedtest: 32x multi-block erase speed is 258894 KiB/s
[ 968.566589] mtd_speedtest: Testing 64x multi-block erase speed
[ 969.545848] mtd_speedtest: 64x multi-block erase speed is 258628 KiB/s
[ 969.552788] mtd_speedtest: finished
[ 969.556928] =================================================
+added the DTS for am335x-evm with ti,nand-xfer-type = "prefetch-dma" support.
Patch:
diff --git a/arch/arm/boot/dts/am335x-evm.dts b/arch/arm/boot/dts/am335x-evm.dts
index ec67e03..578c8d7 100644
--- a/arch/arm/boot/dts/am335x-evm.dts
+++ b/arch/arm/boot/dts/am335x-evm.dts
@@ -505,6 +505,7 @@
gpmc,wr-access-ns = <40>;
gpmc,wr-data-mux-bus-ns = <0>;
ti,nand-ecc-opt= "bch8";
+ ti,nand-xfer-type = "prefetch-dma";
ti,elm-id = <&elm>;
/* MTD partition table */
/* All SPL-* partitions are sized to minimal length
[ 1.708658] ONFI param page 0 valid
[ 1.712413] ONFI flash detected
[ 1.715741] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP), 256MiB, page size: 2048, OOB size: 64
[ 1.727799] omap2-nand: detected x8 NAND flash
[ 1.732707] omap2-nand omap2-nand.0: DMA engine request failed