芯片NUC980DK61Y,使用的SPI NandFlash为Winbond W25N01GV 按照NUC980 Linux BSP 使用手冊进行编译,kernel的编译使用:make nuc980_iot_defconfig
开机kernel log报错,报了很多"Bad eraseblock",log如下:
nand: device found, Manufacturer ID: 0xef, Chip ID: 0xaa
nand: Winbond W25N01GV 1G 3.3V
nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
nand: WARNING: spi0.0: the ECC used on your system is too weak compared to the one required by the NAND chip
Scanning device for bad blocks
Bad eraseblock 9 at 0x000000120000
Bad eraseblock 10 at 0x000000140000
Bad eraseblock 11 at 0x000000160000
...(中间省略)
Bad eraseblock 1022 at 0x000007fc0000
Bad eraseblock 1023 at 0x000007fe0000
Creating 3 MTD partitions on "nand0":
0x000000000000-0x000000200000 : "u-boot"
0x000000200000-0x000001600000 : "Kernel"
0x000001600000-0x000008000000 : "user"
开机后对/dev/mtdblock2设备的读写操作也是异常的,
查看kernel源码,发现SPI NandFLash的驱动为drivers/staging/mt29f_spinand/mt29f_spinand.c,
但是Bad eraseblock错误出现在drivers/mtd/nand/nand_bbt.c,暂时看不出明显问题
大家是否有解决方案?
|