mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 00:41:17 +00:00
2f2e81a4ea
The patch was rejected by upstream. The mtk_nand driver should be modified to support the mt7621 flash controller instead. As there is no newer version to backport, or no upstream version to fix bugs, let's move the driver to the files dir under the ramips target. This makes it easier to make changes to the driver while waiting for mt7621 support to land in mtk_nand. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
48 lines
1.9 KiB
Diff
48 lines
1.9 KiB
Diff
From e84e2430ee0e483842b4ff013ae8a6e7e2fa2734 Mon Sep 17 00:00:00 2001
|
|
From: Weijie Gao <weijie.gao@mediatek.com>
|
|
Date: Wed, 1 Apr 2020 02:07:58 +0800
|
|
Subject: [PATCH 1/2] mtd: rawnand: add driver support for MT7621 nand
|
|
flash controller
|
|
|
|
This patch adds NAND flash controller driver for MediaTek MT7621 SoC.
|
|
|
|
The NAND flash controller is similar with controllers described in
|
|
mtk_nand.c, except that the controller from MT7621 doesn't support DMA
|
|
transmission, and some registers' offset and fields are different.
|
|
|
|
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
|
|
---
|
|
drivers/mtd/nand/raw/Kconfig | 8 +
|
|
drivers/mtd/nand/raw/Makefile | 1 +
|
|
drivers/mtd/nand/raw/mt7621_nand.c | 1348 ++++++++++++++++++++++++++++++++++++
|
|
3 files changed, 1357 insertions(+)
|
|
create mode 100644 drivers/mtd/nand/raw/mt7621_nand.c
|
|
|
|
--- a/drivers/mtd/nand/raw/Kconfig
|
|
+++ b/drivers/mtd/nand/raw/Kconfig
|
|
@@ -387,6 +387,14 @@ config MTD_NAND_QCOM
|
|
Enables support for NAND flash chips on SoCs containing the EBI2 NAND
|
|
controller. This controller is found on IPQ806x SoC.
|
|
|
|
+config MTD_NAND_MT7621
|
|
+ tristate "MT7621 NAND controller"
|
|
+ depends on SOC_MT7621 || COMPILE_TEST
|
|
+ depends on HAS_IOMEM
|
|
+ help
|
|
+ Enables support for NAND controller on MT7621 SoC.
|
|
+ This driver uses PIO mode for data transmission instead of DMA mode.
|
|
+
|
|
config MTD_NAND_MTK
|
|
tristate "MTK NAND controller"
|
|
depends on ARCH_MEDIATEK || COMPILE_TEST
|
|
--- a/drivers/mtd/nand/raw/Makefile
|
|
+++ b/drivers/mtd/nand/raw/Makefile
|
|
@@ -51,6 +51,7 @@ obj-$(CONFIG_MTD_NAND_SUNXI) += sunxi_n
|
|
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_MT7621) += mt7621_nand.o
|
|
obj-$(CONFIG_MTD_NAND_MTK) += mtk_ecc.o mtk_nand.o
|
|
obj-$(CONFIG_MTD_NAND_MXIC) += mxic_nand.o
|
|
obj-$(CONFIG_MTD_NAND_TEGRA) += tegra_nand.o
|