Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 914704e0 authored by Tony O'Brien's avatar Tony O'Brien Committed by Greg Kroah-Hartman
Browse files

mtd: rawnand: marvell: Use correct logic for nand-keep-config



commit ce107713b722af57c4b7f2477594d445b496420e upstream.

Originally the absence of the marvell,nand-keep-config property caused
the setup_data_interface function to be provided. However when
setup_data_interface was moved into nand_controller_ops the logic was
unintentionally inverted. Update the logic so that only if the
marvell,nand-keep-config property is present the bootloader NAND config
kept.

Cc: stable@vger.kernel.org
Fixes: 7a08dbae ("mtd: rawnand: Move ->setup_data_interface() to nand_controller_ops")
Signed-off-by: default avatarTony O'Brien <tony.obrien@alliedtelesis.co.nz>
Signed-off-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: default avatarBoris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220927024728.28447-1-chris.packham@alliedtelesis.co.nz


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5d36037b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2630,7 +2630,7 @@ static int marvell_nand_chip_init(struct device *dev, struct marvell_nfc *nfc,
	chip->controller = &nfc->controller;
	nand_set_flash_node(chip, np);

	if (!of_property_read_bool(np, "marvell,nand-keep-config"))
	if (of_property_read_bool(np, "marvell,nand-keep-config"))
		chip->options |= NAND_KEEP_TIMINGS;

	mtd = nand_to_mtd(chip);