Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'mtd/mtk-spi-nand-for-5.19' into nand/next

Mediatek ECC changes:
* Also parse the default nand-ecc-engine property if available
* Make mtk_ecc.c a separated module

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>

+16 -5
+7
drivers/mtd/nand/Kconfig
··· 53 53 help 54 54 This enables support for the hardware ECC engine from Macronix. 55 55 56 + config MTD_NAND_ECC_MEDIATEK 57 + tristate "Mediatek hardware ECC engine" 58 + depends on HAS_IOMEM 59 + select MTD_NAND_ECC 60 + help 61 + This enables support for the hardware ECC engine from Mediatek. 62 + 56 63 endmenu 57 64 58 65 endmenu
+1
drivers/mtd/nand/Makefile
··· 2 2 3 3 nandcore-objs := core.o bbt.o 4 4 obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o 5 + obj-$(CONFIG_MTD_NAND_ECC_MEDIATEK) += ecc-mtk.o 5 6 6 7 obj-y += onenand/ 7 8 obj-y += raw/
+1
drivers/mtd/nand/raw/Kconfig
··· 374 374 375 375 config MTD_NAND_MTK 376 376 tristate "MTK NAND controller" 377 + depends on MTD_NAND_ECC_MEDIATEK 377 378 depends on ARCH_MEDIATEK || COMPILE_TEST 378 379 depends on HAS_IOMEM 379 380 help
+1 -1
drivers/mtd/nand/raw/Makefile
··· 48 48 obj-$(CONFIG_MTD_NAND_HISI504) += hisi504_nand.o 49 49 obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmnand/ 50 50 obj-$(CONFIG_MTD_NAND_QCOM) += qcom_nandc.o 51 - obj-$(CONFIG_MTD_NAND_MTK) += mtk_ecc.o mtk_nand.o 51 + obj-$(CONFIG_MTD_NAND_MTK) += mtk_nand.o 52 52 obj-$(CONFIG_MTD_NAND_MXIC) += mxic_nand.o 53 53 obj-$(CONFIG_MTD_NAND_TEGRA) += tegra_nand.o 54 54 obj-$(CONFIG_MTD_NAND_STM32_FMC2) += stm32_fmc2_nand.o
+5 -3
drivers/mtd/nand/raw/mtk_ecc.c drivers/mtd/nand/ecc-mtk.c
··· 15 15 #include <linux/of.h> 16 16 #include <linux/of_platform.h> 17 17 #include <linux/mutex.h> 18 - 19 - #include "mtk_ecc.h" 18 + #include <linux/mtd/nand-ecc-mtk.h> 20 19 21 20 #define ECC_IDLE_MASK BIT(0) 22 21 #define ECC_IRQ_EN BIT(0) ··· 278 279 struct mtk_ecc *ecc = NULL; 279 280 struct device_node *np; 280 281 281 - np = of_parse_phandle(of_node, "ecc-engine", 0); 282 + np = of_parse_phandle(of_node, "nand-ecc-engine", 0); 283 + /* for backward compatibility */ 284 + if (!np) 285 + np = of_parse_phandle(of_node, "ecc-engine", 0); 282 286 if (np) { 283 287 ecc = mtk_ecc_get(np); 284 288 of_node_put(np);
drivers/mtd/nand/raw/mtk_ecc.h include/linux/mtd/nand-ecc-mtk.h
+1 -1
drivers/mtd/nand/raw/mtk_nand.c
··· 17 17 #include <linux/iopoll.h> 18 18 #include <linux/of.h> 19 19 #include <linux/of_device.h> 20 - #include "mtk_ecc.h" 20 + #include <linux/mtd/nand-ecc-mtk.h> 21 21 22 22 /* NAND controller register definition */ 23 23 #define NFI_CNFG (0x00)