[NUC975]NAND MTD partition挂载失败

Nuvoton_N329 |浏览143次
收藏|2023/08/15 14:50

[    1.530000] NAND device: Manufacturer ID: 0x01, Chip ID: 0xda (AMD/Spansion NAND 256MiB 3,3                                                                                                     V 8-bit), 256MiB, page size: 2048, OOB size: 64

[    1.540000] nand: SMRA size 64, 32

[    1.550000] Bad block table not found for chip 0

[    1.560000] Bad block table not found for chip 0

[    1.560000] Scanning device for bad blocks

[    1.810000] Bad eraseblock 2036 at 0x00000fe80000

[    1.810000] Bad eraseblock 2038 at 0x00000fec0000

[    1.820000] Bad eraseblock 2039 at 0x00000fee0000

[    1.820000] Bad eraseblock 2040 at 0x00000ff00000

[    1.830000] Bad eraseblock 2042 at 0x00000ff40000

[    1.830000] Bad eraseblock 2044 at 0x00000ff80000

[    1.840000] Bad eraseblock 2045 at 0x00000ffa0000

[    1.840000] Bad eraseblock 2046 at 0x00000ffc0000

[    1.850000] Bad eraseblock 2047 at 0x00000ffe0000

[    1.850000] No space left to write bad block table


满意回答

2023/08/15 14:59

No space left to write bad block table

原因是没有空间存BBT,Linux MTD nand driver有要求最后4个block需要是好块,而当前flash最后的block都是坏块

参考:https://static.lwn.net/kerneldoc/driver-api/mtdnand.html

  • Number of reserved blocks

    For automatic placement some blocks must be reserved for bad block table storage. The number of reserved blocks is defined in the maxblocks member of the bad block table description structure. Reserving 4 blocks for mirrored tables should be a reasonable number. This also limits the number of blocks which are scanned for the bad block table ident pattern.

Linux 驱动中可通过修改这个定义放大BBT reserved block

./drivers/mtd/nand/diskonchip.c:#define INFTL_BBT_RESERVED_BLOCKS 4


nuvoton2022

其他回答(0)
0人关注该问题
+1
 加载中...