mtd: rawnand: add Loongson1 NAND driver
Subsystems (3)
PATCH v5 1/1 mtd: rawnand: add Loongson1 NAND driver
From: Keguang Zhang <[email protected]>
This patch adds NAND driver for Loongson1B.
Signed-off-by Keguang Zhang <[email protected]>
---
V4 -> V5:
Update the driver to fit the raw NAND framework. Implement exec_op() instead of legacy cmdfunc(). Use dma_request_chan() instead of dma_request_channel(). Some minor fixes and cleanups.
V3 -> V4:
Retrieve the controller from nand_hw_control.
V2 -> V3:
Replace __raw_readl/__raw_writel with readl/writel. Split ls1x_nand into two structures: ls1x_nand_chip and ls1x_nand_controller.
V1 -> V2:
Modify the dependency in Kconfig due to the changes of DMA module.
--- drivers/mtd/nand/raw/Kconfig | 8 + drivers/mtd/nand/raw/Makefile | 1 + drivers/mtd/nand/raw/loongson1_nand.c | 770 ++++++++++++++++++++++++++ 3 files changed, 779 insertions(+) create mode 100644 drivers/mtd/nand/raw/loongson1_nand.c
drivers/mtd/nand/raw/Kconfig +8 -0
@@ -453,6 +453,14 @@ config MTD_NAND_ROCKCHIP NFC v800: RK3308, RV1108 NFC v900: PX30, RK3326 +config MTD_NAND_LOONGSON1 + tristate "Support for Loongson1 SoC NAND controller" + depends on MACH_LOONGSON32 + select MTD_NAND_ECC_SW_HAMMING + select LOONGSON1_DMA + help + Enables support for NAND controller on Loongson1 SoCs. + comment "Misc" config MTD_SM_COMMON
drivers/mtd/nand/raw/Makefile +1 -0
@@ -57,6 +57,7 @@ obj-$(CONFIG_MTD_NAND_CADENCE) += cadence-nand-controller.o obj-$(CONFIG_MTD_NAND_ARASAN) += arasan-nand-controller.o obj-$(CONFIG_MTD_NAND_INTEL_LGM) += intel-nand-controller.o obj-$(CONFIG_MTD_NAND_ROCKCHIP) += rockchip-nand-controller.o +obj-$(CONFIG_MTD_NAND_LOONGSON1) += loongson1_nand.o nand-objs := nand_base.o nand_legacy.o nand_bbt.o nand_timings.o nand_ids.o nand-objs += nand_onfi.o
drivers/mtd/nand/raw/loongson1_nand.c new file +770 -0
770 lines not on this page · raw message
base-commit: fd0d8d85f7230052e638a56d1bfea170c488e6bc
Signature · 6 lines
2.25.1 ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/