openwrt/target/linux/ath79
Koen Vandeputte f4f4259ca1 ath79: ar934x-nand: fix broken nand on kernel 5.10
Booting current 5.10.x testing kernel shows this:

[    0.335781] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    0.342280] nand: Samsung NAND 128MiB 3,3V 8-bit
[    0.346982] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,
OOB size: 64
[    0.354703] ar934x-nand 1b800200.nand: unknown ECC mode 2
[    0.360193] ar934x-nand 1b800200.nand: nand_scan failed, err:-22
[    0.366341] ar934x-nand: probe of 1b800200.nand failed with error -22

...

[    1.089264] /dev/root: Can't open blockdev
[    1.093482] VFS: Cannot open root device "(null)" or
unknown-block(0,0): error -6
[    1.101077] Please append a correct "root=" boot option; here are the
available partitions:
[    1.109555] 1f00              64 mtdblock0
[    1.109559]  (driver?)
[    1.116199] 1f01              48 mtdblock1
[    1.116202]  (driver?)
[    1.122841] 1f02               4 mtdblock2
[    1.122844]  (driver?)
[    1.129493] 1f03               4 mtdblock3
[    1.129497]  (driver?)
[    1.136138] 1f04               4 mtdblock4
[    1.136142]  (driver?)
[    1.142787] Kernel panic - not syncing: VFS: Unable to mount root fs
on unknown-block(0,0)
[    1.151168] Rebooting in 1 seconds..

The issue is caused by a wrong check for ECC engine type
on newer kernels.

Fix this.

Bootlog after:

[    0.335689] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    0.342192] nand: Samsung NAND 128MiB 3,3V 8-bit
[    0.346884] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,
OOB size: 64
[    0.354611] Scanning device for bad blocks
[    0.364924] random: fast init done
[    0.496641] 3 fixed-partitions partitions found on MTD device
ar934x-nand
[    0.503545] Creating 3 MTD partitions on "ar934x-nand":
[    0.508865] 0x000000000000-0x000000040000 : "booter"
[    0.515133] 0x000000040000-0x000000400000 : "kernel"
[    0.523265] 0x000000400000-0x000008000000 : "ubi"

Fixes: fb64e2c30f ("ath79: ar934x-nand: add kernel 5.10 compatibility")
Signed-off-by: Koen Vandeputte <koen.vandeputte@citymesh.com>
2021-04-06 17:00:07 +02:00
..
base-files/etc/hotplug.d/ieee80211 ath79: add WiFi migration for AR913x 2020-09-28 16:23:03 +02:00
dts ath79: Add support for Buffalo WZR-HP-G300NH 2021-03-22 09:23:10 +01:00
files ath79: ar934x-nand: fix broken nand on kernel 5.10 2021-04-06 17:00:07 +02:00
generic ath79: fix label_mac for NEC Aterm WG1200CR 2021-03-27 16:28:01 +01:00
image ath79: Add support for Buffalo WZR-HP-G300NH 2021-03-22 09:23:10 +01:00
mikrotik treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
nand treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
patches-5.4 kernel: backport 5.13 mtd partitioning changes 2021-03-29 08:46:17 +02:00
patches-5.10 kernel: backport 5.13 mtd partitioning changes 2021-03-29 08:46:17 +02:00
tiny treewide: remove execute bit and shebang from board.d files 2021-03-06 11:30:06 +01:00
config-5.4 ath79: enable Regulator support for target 2021-02-22 00:57:25 +01:00
config-5.10 ath79: enable AT803X PHY for kernel 5.10 2021-03-05 00:03:57 +01:00
Makefile ath79: add kernel 5.10 support 2021-02-20 01:26:33 +01:00
modules.mk