From 43ab8d17cebc368d72a5b1b6fee2024044f888ce Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Apr 20 2023 11:00:13 +0000 Subject: mtd: rawnand: stm32_fmc2: remove unsupported EDO mode (bsc#1012628). --- diff --git a/patches.kernel.org/6.2.12-023-mtd-rawnand-stm32_fmc2-remove-unsupported-EDO-.patch b/patches.kernel.org/6.2.12-023-mtd-rawnand-stm32_fmc2-remove-unsupported-EDO-.patch new file mode 100644 index 0000000..fba8525 --- /dev/null +++ b/patches.kernel.org/6.2.12-023-mtd-rawnand-stm32_fmc2-remove-unsupported-EDO-.patch @@ -0,0 +1,41 @@ +From: Christophe Kerello +Date: Tue, 28 Mar 2023 17:58:18 +0200 +Subject: [PATCH] mtd: rawnand: stm32_fmc2: remove unsupported EDO mode +References: bsc#1012628 +Patch-mainline: 6.2.12 +Git-commit: f71e0e329c152c7f11ddfd97ffc62aba152fad3f + +commit f71e0e329c152c7f11ddfd97ffc62aba152fad3f upstream. + +Remove the EDO mode support from as the FMC2 controller does not +support the feature. + +Signed-off-by: Christophe Kerello +Fixes: 2cd457f328c1 ("mtd: rawnand: stm32_fmc2: add STM32 FMC2 NAND flash controller driver") +Cc: stable@vger.kernel.org #v5.4+ +Reviewed-by: Tudor Ambarus +Signed-off-by: Miquel Raynal +Link: https://lore.kernel.org/linux-mtd/20230328155819.225521-2-christophe.kerello@foss.st.com +Signed-off-by: Greg Kroah-Hartman +Signed-off-by: Jiri Slaby +--- + drivers/mtd/nand/raw/stm32_fmc2_nand.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/drivers/mtd/nand/raw/stm32_fmc2_nand.c b/drivers/mtd/nand/raw/stm32_fmc2_nand.c +index 5d627048..3abb63d0 100644 +--- a/drivers/mtd/nand/raw/stm32_fmc2_nand.c ++++ b/drivers/mtd/nand/raw/stm32_fmc2_nand.c +@@ -1531,6 +1531,9 @@ static int stm32_fmc2_nfc_setup_interface(struct nand_chip *chip, int chipnr, + if (IS_ERR(sdrt)) + return PTR_ERR(sdrt); + ++ if (sdrt->tRC_min < 30000) ++ return -EOPNOTSUPP; ++ + if (chipnr == NAND_DATA_IFACE_CHECK_ONLY) + return 0; + +-- +2.35.3 + diff --git a/series.conf b/series.conf index 9981b44..2e50c81 100644 --- a/series.conf +++ b/series.conf @@ -2250,6 +2250,7 @@ patches.kernel.org/6.2.12-020-fbmem-Reject-FB_ACTIVATE_KD_TEXT-from-userspac.patch patches.kernel.org/6.2.12-021-mtdblock-tolerate-corrected-bit-flips.patch patches.kernel.org/6.2.12-022-mtd-rawnand-meson-fix-bitmask-for-length-in-co.patch + patches.kernel.org/6.2.12-023-mtd-rawnand-stm32_fmc2-remove-unsupported-EDO-.patch ######################################################## # Build fixes that apply to the vanilla kernel too.