linux-stable/drivers/mtd/parsers
Francesco Dolcini 82761993d4 mtd: parsers: ofpart: add workaround for #size-cells 0
commit 84549c816d upstream.

Add a mechanism to handle the case in which partitions are present as
direct child of the nand controller node and #size-cells is set to <0>.

This could happen if the nand-controller node in the DTS is supposed to
have #size-cells set to 0, but for some historical reason/bug it was set
to 1 in the past, and the firmware (e.g. U-Boot) is adding the partition
as direct children of the nand-controller defaulting to #size-cells
being to 1.

This prevents a real boot failure on colibri-imx7 that happened during v6.1
development cycles.

Link: https://lore.kernel.org/all/Y4dgBTGNWpM6SQXI@francesco-nb.int.toradex.com/
Link: https://lore.kernel.org/all/20221202071900.1143950-1-francesco@dolcini.it/
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20230124104444.330913-1-francesco@dolcini.it
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-16 19:06:29 +01:00
..
afs.c
ar7part.c
bcm47xxpart.c mtd: parsers: bcm47xxpart: Fix halfblock reads 2022-10-18 11:20:12 +02:00
bcm63xxpart.c
brcm_u-boot.c mtd: parsers: add Broadcom's U-Boot parser 2022-09-19 18:13:08 +02:00
cmdlinepart.c mtd: move from strlcpy with unused retval to strscpy 2022-09-19 18:14:53 +02:00
Kconfig mtd: parsers: refer to ARCH_BCMBCA instead of ARCH_BCM4908 2023-07-19 16:22:16 +02:00
Makefile mtd: parsers: add Broadcom's U-Boot parser 2022-09-19 18:13:08 +02:00
ofpart_bcm4908.c mtd: parsers: ofpart: Fix refcount leak in bcm4908_partitions_fw_offset 2022-06-09 15:03:32 +02:00
ofpart_bcm4908.h
ofpart_core.c mtd: parsers: ofpart: add workaround for #size-cells 0 2024-02-16 19:06:29 +01:00
ofpart_linksys_ns.c
ofpart_linksys_ns.h
parser_imagetag.c
parser_trx.c
qcomsmempart.c
redboot.c
scpart.c mtd: parsers: scpart: fix __udivdi3 undefined on mips 2023-01-18 11:58:24 +01:00
sharpslpart.c