Lost MTD drivers in kernel 5.10 branch

Jupiter jupiter.hce at gmail.com
Thu May 12 02:59:58 PDT 2022


Hello,

I could run MTD and UBIFS very well in kernel 4.19 built by Yocto Zeus
branch, after upgrading to kernel 5.10 branch, I could not run MTD and
UBIFS, missing /dev/mtd* drivers and an empty table by cat /proc/mtd.

Given I set the identical MTD and UBI configuration in defconfig and
uboot configure for both kernels, I could not see defconf is causing
the MTD drivers problem in kernel 5.10 branch. Further adding the
debug on

CONFIG_MTD=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_OF_PARTS=y
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y
CONFIG_MTD_JEDECPROBE=y
CONFIG_MTD_GEN_PROBE=y
CONFIG_MTD_MAP_BANK_WIDTH_1=y
CONFIG_MTD_MAP_BANK_WIDTH_2=y
CONFIG_MTD_MAP_BANK_WIDTH_4=y
CONFIG_MTD_CFI_I1=y
CONFIG_MTD_CFI_I2=y
CONFIG_MTD_CFI_INTELEXT=y
CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_CFI_STAA=y
CONFIG_MTD_CFI_UTIL=y
CONFIG_MTD_NAND_CORE=y
CONFIG_MTD_NAND_ECC_SW_HAMMING=y
CONFIG_MTD_RAW_NAND=y
CONFIG_MTD_NAND_VF610_NFC=y
CONFIG_MTD_NAND_MXC=y
CONFIG_MTD_NAND_ECC=y
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_FASTMAP=y
CONFIG_MTD_UBI_BLOCK=y
CONFIG_UBIFS_FS=y

The nand_base.c nand_detect was not called so all of following nand
functions were missing in kernel boot:

[    7.576334] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xda
[    7.582910] nand: Winbond W29N02GV
[    7.586631] nand: 256 MiB, SLC, erase size: 128 KiB, page size:
2048, OOB size: 64
[    7.601297] Bad block table found at page 131008, version 0x01
[    7.608736] Bad block table found at page 130944, version 0x01
[    7.616692] 3 cmdlinepart partitions found on MTD device gpmi-nand
[    7.623021] Creating 3 MTD partitions on "gpmi-nand":
[    7.628466] 0x000000000000-0x000000400000 : "boot"
[    7.651267] 0x000000400000-0x000000500000 : "ubootenv"
[    7.666836] 0x000000500000-0x000010000000 : "storage"
[    8.111031] gpmi-nand 1806000.gpmi-nand: driver registered.

Are there any changes in kernel 5.10 MTD to require some new MTD configurations?

Appreciate your insider advice.

Thank you.

Kind regards,

jupiter



More information about the linux-mtd mailing list