Commit 4fd62f15 authored by Chuanhong Guo's avatar Chuanhong Guo Committed by Miquel Raynal
Browse files

mtd: nand: make mtk_ecc.c a separated module



this code will be used in mediatek snfi spi-mem controller with
pipelined ECC engine.

Signed-off-by: default avatarChuanhong Guo <gch981213@gmail.com>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20220424032527.673605-2-gch981213@gmail.com
parent 31231092
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -53,6 +53,13 @@ config MTD_NAND_ECC_MXIC
	help
	  This enables support for the hardware ECC engine from Macronix.

config MTD_NAND_ECC_MEDIATEK
	tristate "Mediatek hardware ECC engine"
	depends on HAS_IOMEM
	select MTD_NAND_ECC
	help
	  This enables support for the hardware ECC engine from Mediatek.

endmenu

endmenu
+1 −0
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

nandcore-objs := core.o bbt.o
obj-$(CONFIG_MTD_NAND_CORE) += nandcore.o
obj-$(CONFIG_MTD_NAND_ECC_MEDIATEK) += ecc-mtk.o

obj-y	+= onenand/
obj-y	+= raw/
+1 −2
Original line number Diff line number Diff line
@@ -15,8 +15,7 @@
#include <linux/of.h>
#include <linux/of_platform.h>
#include <linux/mutex.h>

#include "mtk_ecc.h"
#include <linux/mtd/nand-ecc-mtk.h>

#define ECC_IDLE_MASK		BIT(0)
#define ECC_IRQ_EN		BIT(0)
+1 −0
Original line number Diff line number Diff line
@@ -374,6 +374,7 @@ config MTD_NAND_QCOM

config MTD_NAND_MTK
	tristate "MTK NAND controller"
	depends on MTD_NAND_ECC_MEDIATEK
	depends on ARCH_MEDIATEK || COMPILE_TEST
	depends on HAS_IOMEM
	help
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ obj-$(CONFIG_MTD_NAND_SUNXI) += sunxi_nand.o
obj-$(CONFIG_MTD_NAND_HISI504)	        += hisi504_nand.o
obj-$(CONFIG_MTD_NAND_BRCMNAND)		+= brcmnand/
obj-$(CONFIG_MTD_NAND_QCOM)		+= qcom_nandc.o
obj-$(CONFIG_MTD_NAND_MTK)		+= mtk_ecc.o mtk_nand.o
obj-$(CONFIG_MTD_NAND_MTK)		+= mtk_nand.o
obj-$(CONFIG_MTD_NAND_MXIC)		+= mxic_nand.o
obj-$(CONFIG_MTD_NAND_TEGRA)		+= tegra_nand.o
obj-$(CONFIG_MTD_NAND_STM32_FMC2)	+= stm32_fmc2_nand.o
Loading