设备树配置SPI 频率 50Mhz:
&spi0 {
status ="okay";
mx25l25635e:mx25l25635e@0 {
compatible = "jedec,spi-nor";
reg = <0x0>;
spi-max-frequency = <50000000>;
#address-cells = <1>;
#size-cells = <1>;
};
};
测试 MX25L512 末32M分区读速度:
默认块大小读
# date;dd if=/dev/mtd6 of=/dev/null;date;
Thu Jan 1 00:05:20 UTC 1970
65536+0 records in
65536+0 records out
Thu Jan 1 00:05:30 UTC 1970
bs采用默认值, 读速度32/10 = 3.2M/s
# date;dd if=/dev/mtd6 of=/dev/null bs=1M;date;
Thu Jan 1 00:15:00 UTC 1970
32+0 records in
32+0 records out
Thu Jan 1 00:15:06 UTC 1970
bs调整到1M, 读速度 32/6 = 5.3MB/s
离线
# date;dd if=/dev/mtd6 of=/dev/null bs=16M;date;
Thu Jan 1 00:18:47 UTC 1970
2+0 records in
2+0 records out
Thu Jan 1 00:18:52 UTC 1970
bs调整到16M, 还能快一秒, 读速度 32/5 = 6.4MB/s
离线
# date;dd if=/dev/mtd6 of=/dev/null bs=1M;date;
Thu Jan 1 00:01:03 UTC 1970
32+0 records in
32+0 records out
Thu Jan 1 00:01:07 UTC 1970
#
#
# date;dd if=/dev/mtd6 of=/dev/null bs=16M;date;
Thu Jan 1 00:00:51 UTC 1970
2+0 records in
2+0 records out
Thu Jan 1 00:00:55 UTC 1970
设备树配置SPI 频率 80Mhz, bs配置1M/16M, 时间都是4秒, 粗算读速度 8MB/s
离线
设备树配置SPI 频率 50Mhz 执行32M 擦除:
# date;flash_eraseall /dev/mtd6;date
Thu Jan 1 00:20:59 UTC 1970
Erasing 64 Kibyte @ 2000000 - 100% complete.
Thu Jan 1 00:22:16 UTC 1970
用时 ((22*60+16) - (20*60+59)) = 77秒
擦除速度 32/77 = 0.41MB/s
离线
设备树配置SPI 频率 50Mhz 执行32M 擦除:
date;dd of=/dev/mtd6 if=/mnt/udisk/mtd6B.bin bs=1M;date
Thu Jan 1 00:26:28 UTC 1970
32+0 records in
32+0 records out
Thu Jan 1 00:27:35 UTC 1970
用时 ((27*60+35) - (26*60+28)) = 67秒
写速度 32/77 = 0.47MB/s
离线