openwrt/target/linux
Koen Vandeputte ffa943f0b9 ath79: ar934x: fix mounting issues if subpage is not supported
Currently, the option to disable subpage writing is only set
when a HW ECC engine is used.

Some boards lack a HW ECC engine and use software for that.
In this case, this NAND option does not get set when the NAND chip
does not support it, resulting in mounting errors.

Move the setting of this option to a generic init location so it
gets set for all types where required.

While at it, also OR the option instead of just setting it
so we don't overwrite potential flags being set somewhere else.

Before:

[    1.681273] UBI: auto-attach mtd2
[    1.684669] ubi0: attaching mtd2
[    1.688877] ubi0 error: validate_ec_hdr: bad VID header offset 2048, expected 512
[    1.696469] ubi0 error: validate_ec_hdr: bad EC header
[    1.701712] Erase counter header dump:
[    1.705512]  magic          0x55424923
[    1.709322]  version        1
[    1.712330]  ec             1
[    1.715331]  vid_hdr_offset 2048
[    1.718610]  data_offset    4096
[    1.721880]  image_seq      1462320675
[    1.725680]  hdr_crc        0x12255a15

After:

    1.680917] UBI: auto-attach mtd2
[    1.684308] ubi0: attaching mtd2
[    2.954504] random: crng init done
[    3.142813] ubi0: scanning is finished
[    3.163455] ubi0: attached mtd2 (name "ubi", size 124 MiB)
[    3.169069] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    3.176037] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    3.182942] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    3.190013] ubi0: good PEBs: 992, bad PEBs: 0, corrupted PEBs: 0
[    3.196102] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    3.203434] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 1462320675
[    3.212700] ubi0: available PEBs: 0, total reserved PEBs: 992, PEBs reserved for bad PEB handling: 20
[    3.222124] ubi0: background thread "ubi_bgt0d" started, PID 317
[    3.230246] block ubiblock0_1: created from ubi0:1(rootfs)
[    3.235819] ubiblock: device ubiblock0_1 (rootfs) set to be root filesystem
[    3.256830] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.

Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
(cherry-picked from commit 6561ca1fa5)
2021-07-09 17:14:01 +02:00
..
apm821xx kernel: bump 5.4 to 5.4.123 2021-05-30 23:45:49 +02:00
arc770 arc770: set device vendor and model variables 2021-05-26 23:36:40 +02:00
archs38 archs38: set device vendor and model variables 2021-05-26 23:36:40 +02:00
armvirt kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
at91 treewide: make AddDepends/usb-serial selective 2021-06-08 22:50:32 +02:00
ath25 kernel: Activate FORTIFY_SOURCE for MIPS kernel 5.4 2021-05-14 23:32:22 +02:00
ath79 ath79: ar934x: fix mounting issues if subpage is not supported 2021-07-09 17:14:01 +02:00
bcm27xx kernel: bump 5.4 to 5.4.128 2021-06-27 00:58:50 +02:00
bcm47xx bcm47xx: make WGT634U NVRAM patch apply again 2021-03-17 23:38:46 +01:00
bcm53xx kernel: bump 5.4 to 5.4.119 2021-05-15 19:32:20 +02:00
bcm63xx bcm63xx: Remove patch already applied upstream 2021-05-23 16:10:41 +02:00
bcm4908 bcm4908: fix Ethernet broken state after interface restart 2021-06-22 08:38:59 +02:00
gemini base-files: generate network config with "device" options 2021-05-27 11:39:15 +02:00
generic kernel: bump 5.4 to 5.4.128 2021-06-27 00:58:50 +02:00
imx6 kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
ipq40xx ipq40xx: add uboot-envtools to default packages 2021-06-08 20:43:56 +02:00
ipq806x kernel: bump 5.4 to 5.4.128 2021-06-27 00:58:50 +02:00
kirkwood kernel: fix parsing fixed subpartitions 2021-05-08 19:29:08 +02:00
lantiq ltq-deu: Mark lantiq DEU broken 2021-07-02 19:22:13 +02:00
layerscape kernel: bump 5.4 to 5.4.128 2021-06-27 00:58:50 +02:00
malta target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
mediatek kernel: bump 5.4 to 5.4.128 2021-06-27 00:58:50 +02:00
mpc85xx mpc85xx: p2020: fix cfi-nor detection 2021-03-01 21:49:55 +01:00
mvebu kernel: bump 5.4 to 5.4.128 2021-06-27 00:58:50 +02:00
mxs target: use SPDX license identifiers on scripts 2021-02-10 15:47:23 +01:00
octeon kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
octeontx kernel: bump 5.4 to 5.4.128 2021-06-27 00:58:50 +02:00
omap kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
oxnas gemini,layerscape,oxnas: don't disable option CONFIG_BPF_SYSCALL 2021-04-16 11:42:42 +01:00
pistachio kernel: add pending mtd patches adding NVMEM support 2021-03-17 21:24:22 +01:00
ramips ramips: mt7620: add kernel size for Jboot devices 2021-06-12 11:01:43 +02:00
realtek realtek: Fix failsafe mode 2021-06-22 23:52:09 +02:00
rockchip kernel: bump 5.4 to 5.4.111 2021-04-11 17:35:12 +02:00
sunxi sunxi: disable LPAE on cortexa8 2021-04-11 00:00:49 +02:00
tegra kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
uml target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00
x86 x86: kernel: enable Fusion-MPT SAS driver 2021-06-08 20:44:00 +02:00
zynq kernel: move some disabled symbols to generic 2021-04-11 16:54:22 +02:00
Makefile target: use SPDX license identifiers on Makefiles 2021-02-10 15:47:18 +01:00