summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-02-05 17:02:04 -0500
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-02-16 04:09:34 -0500
commit93db446a424cee9387b532995e6b516667079555 (patch)
tree39c7900ae38d890fb971ea5fc6f194f7e66fa797
parent7b6afee7291802aa8c02aa918782033992caf641 (diff)
mtd: nand: move raw NAND related code to the raw/ subdir
As part of the process of sharing more code between different NAND based devices, we need to move all raw NAND related code to the raw/ subdirectory. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
-rw-r--r--Documentation/arm/Samsung-S3C24XX/S3C2412.txt2
-rw-r--r--Documentation/driver-api/mtdnand.rst8
-rw-r--r--Documentation/gpio/drivers-on-gpio.txt4
-rw-r--r--MAINTAINERS22
-rw-r--r--drivers/mtd/nand/Kconfig581
-rw-r--r--drivers/mtd/nand/Makefile67
-rw-r--r--drivers/mtd/nand/raw/Kconfig580
-rw-r--r--drivers/mtd/nand/raw/Makefile68
-rw-r--r--drivers/mtd/nand/raw/ams-delta.c (renamed from drivers/mtd/nand/ams-delta.c)0
-rw-r--r--drivers/mtd/nand/raw/atmel/Makefile (renamed from drivers/mtd/nand/atmel/Makefile)0
-rw-r--r--drivers/mtd/nand/raw/atmel/nand-controller.c (renamed from drivers/mtd/nand/atmel/nand-controller.c)0
-rw-r--r--drivers/mtd/nand/raw/atmel/pmecc.c (renamed from drivers/mtd/nand/atmel/pmecc.c)0
-rw-r--r--drivers/mtd/nand/raw/atmel/pmecc.h (renamed from drivers/mtd/nand/atmel/pmecc.h)0
-rw-r--r--drivers/mtd/nand/raw/au1550nd.c (renamed from drivers/mtd/nand/au1550nd.c)0
-rw-r--r--drivers/mtd/nand/raw/bcm47xxnflash/Makefile (renamed from drivers/mtd/nand/bcm47xxnflash/Makefile)0
-rw-r--r--drivers/mtd/nand/raw/bcm47xxnflash/bcm47xxnflash.h (renamed from drivers/mtd/nand/bcm47xxnflash/bcm47xxnflash.h)0
-rw-r--r--drivers/mtd/nand/raw/bcm47xxnflash/main.c (renamed from drivers/mtd/nand/bcm47xxnflash/main.c)0
-rw-r--r--drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.c (renamed from drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c)0
-rw-r--r--drivers/mtd/nand/raw/bf5xx_nand.c (renamed from drivers/mtd/nand/bf5xx_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/brcmnand/Makefile (renamed from drivers/mtd/nand/brcmnand/Makefile)0
-rw-r--r--drivers/mtd/nand/raw/brcmnand/bcm63138_nand.c (renamed from drivers/mtd/nand/brcmnand/bcm63138_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c (renamed from drivers/mtd/nand/brcmnand/bcm6368_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/brcmnand/brcmnand.c (renamed from drivers/mtd/nand/brcmnand/brcmnand.c)0
-rw-r--r--drivers/mtd/nand/raw/brcmnand/brcmnand.h (renamed from drivers/mtd/nand/brcmnand/brcmnand.h)0
-rw-r--r--drivers/mtd/nand/raw/brcmnand/brcmstb_nand.c (renamed from drivers/mtd/nand/brcmnand/brcmstb_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/brcmnand/iproc_nand.c (renamed from drivers/mtd/nand/brcmnand/iproc_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/cafe_nand.c (renamed from drivers/mtd/nand/cafe_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/cmx270_nand.c (renamed from drivers/mtd/nand/cmx270_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/cs553x_nand.c (renamed from drivers/mtd/nand/cs553x_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/davinci_nand.c (renamed from drivers/mtd/nand/davinci_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/denali.c (renamed from drivers/mtd/nand/denali.c)0
-rw-r--r--drivers/mtd/nand/raw/denali.h (renamed from drivers/mtd/nand/denali.h)0
-rw-r--r--drivers/mtd/nand/raw/denali_dt.c (renamed from drivers/mtd/nand/denali_dt.c)0
-rw-r--r--drivers/mtd/nand/raw/denali_pci.c (renamed from drivers/mtd/nand/denali_pci.c)0
-rw-r--r--drivers/mtd/nand/raw/diskonchip.c (renamed from drivers/mtd/nand/diskonchip.c)0
-rw-r--r--drivers/mtd/nand/raw/docg4.c (renamed from drivers/mtd/nand/docg4.c)0
-rw-r--r--drivers/mtd/nand/raw/fsl_elbc_nand.c (renamed from drivers/mtd/nand/fsl_elbc_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/fsl_ifc_nand.c (renamed from drivers/mtd/nand/fsl_ifc_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/fsl_upm.c (renamed from drivers/mtd/nand/fsl_upm.c)0
-rw-r--r--drivers/mtd/nand/raw/fsmc_nand.c (renamed from drivers/mtd/nand/fsmc_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/gpio.c (renamed from drivers/mtd/nand/gpio.c)0
-rw-r--r--drivers/mtd/nand/raw/gpmi-nand/Makefile (renamed from drivers/mtd/nand/gpmi-nand/Makefile)0
-rw-r--r--drivers/mtd/nand/raw/gpmi-nand/bch-regs.h (renamed from drivers/mtd/nand/gpmi-nand/bch-regs.h)0
-rw-r--r--drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c (renamed from drivers/mtd/nand/gpmi-nand/gpmi-lib.c)0
-rw-r--r--drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c (renamed from drivers/mtd/nand/gpmi-nand/gpmi-nand.c)0
-rw-r--r--drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h (renamed from drivers/mtd/nand/gpmi-nand/gpmi-nand.h)0
-rw-r--r--drivers/mtd/nand/raw/gpmi-nand/gpmi-regs.h (renamed from drivers/mtd/nand/gpmi-nand/gpmi-regs.h)0
-rw-r--r--drivers/mtd/nand/raw/hisi504_nand.c (renamed from drivers/mtd/nand/hisi504_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/jz4740_nand.c (renamed from drivers/mtd/nand/jz4740_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/jz4780_bch.c (renamed from drivers/mtd/nand/jz4780_bch.c)0
-rw-r--r--drivers/mtd/nand/raw/jz4780_bch.h (renamed from drivers/mtd/nand/jz4780_bch.h)0
-rw-r--r--drivers/mtd/nand/raw/jz4780_nand.c (renamed from drivers/mtd/nand/jz4780_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/lpc32xx_mlc.c (renamed from drivers/mtd/nand/lpc32xx_mlc.c)0
-rw-r--r--drivers/mtd/nand/raw/lpc32xx_slc.c (renamed from drivers/mtd/nand/lpc32xx_slc.c)0
-rw-r--r--drivers/mtd/nand/raw/marvell_nand.c (renamed from drivers/mtd/nand/marvell_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/mpc5121_nfc.c (renamed from drivers/mtd/nand/mpc5121_nfc.c)0
-rw-r--r--drivers/mtd/nand/raw/mtk_ecc.c (renamed from drivers/mtd/nand/mtk_ecc.c)0
-rw-r--r--drivers/mtd/nand/raw/mtk_ecc.h (renamed from drivers/mtd/nand/mtk_ecc.h)0
-rw-r--r--drivers/mtd/nand/raw/mtk_nand.c (renamed from drivers/mtd/nand/mtk_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/mxc_nand.c (renamed from drivers/mtd/nand/mxc_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/nand_amd.c (renamed from drivers/mtd/nand/nand_amd.c)0
-rw-r--r--drivers/mtd/nand/raw/nand_base.c (renamed from drivers/mtd/nand/nand_base.c)0
-rw-r--r--drivers/mtd/nand/raw/nand_bbt.c (renamed from drivers/mtd/nand/nand_bbt.c)0
-rw-r--r--drivers/mtd/nand/raw/nand_bch.c (renamed from drivers/mtd/nand/nand_bch.c)0
-rw-r--r--drivers/mtd/nand/raw/nand_ecc.c (renamed from drivers/mtd/nand/nand_ecc.c)0
-rw-r--r--drivers/mtd/nand/raw/nand_hynix.c (renamed from drivers/mtd/nand/nand_hynix.c)0
-rw-r--r--drivers/mtd/nand/raw/nand_ids.c (renamed from drivers/mtd/nand/nand_ids.c)0
-rw-r--r--drivers/mtd/nand/raw/nand_macronix.c (renamed from drivers/mtd/nand/nand_macronix.c)0
-rw-r--r--drivers/mtd/nand/raw/nand_micron.c (renamed from drivers/mtd/nand/nand_micron.c)0
-rw-r--r--drivers/mtd/nand/raw/nand_samsung.c (renamed from drivers/mtd/nand/nand_samsung.c)0
-rw-r--r--drivers/mtd/nand/raw/nand_timings.c (renamed from drivers/mtd/nand/nand_timings.c)0
-rw-r--r--drivers/mtd/nand/raw/nand_toshiba.c (renamed from drivers/mtd/nand/nand_toshiba.c)0
-rw-r--r--drivers/mtd/nand/raw/nandsim.c (renamed from drivers/mtd/nand/nandsim.c)0
-rw-r--r--drivers/mtd/nand/raw/ndfc.c (renamed from drivers/mtd/nand/ndfc.c)0
-rw-r--r--drivers/mtd/nand/raw/nuc900_nand.c (renamed from drivers/mtd/nand/nuc900_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/omap2.c (renamed from drivers/mtd/nand/omap2.c)0
-rw-r--r--drivers/mtd/nand/raw/omap_elm.c (renamed from drivers/mtd/nand/omap_elm.c)0
-rw-r--r--drivers/mtd/nand/raw/orion_nand.c (renamed from drivers/mtd/nand/orion_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/oxnas_nand.c (renamed from drivers/mtd/nand/oxnas_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/pasemi_nand.c (renamed from drivers/mtd/nand/pasemi_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/plat_nand.c (renamed from drivers/mtd/nand/plat_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/pxa3xx_nand.c (renamed from drivers/mtd/nand/pxa3xx_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/qcom_nandc.c (renamed from drivers/mtd/nand/qcom_nandc.c)0
-rw-r--r--drivers/mtd/nand/raw/r852.c (renamed from drivers/mtd/nand/r852.c)0
-rw-r--r--drivers/mtd/nand/raw/r852.h (renamed from drivers/mtd/nand/r852.h)0
-rw-r--r--drivers/mtd/nand/raw/s3c2410.c (renamed from drivers/mtd/nand/s3c2410.c)0
-rw-r--r--drivers/mtd/nand/raw/sh_flctl.c (renamed from drivers/mtd/nand/sh_flctl.c)0
-rw-r--r--drivers/mtd/nand/raw/sharpsl.c (renamed from drivers/mtd/nand/sharpsl.c)0
-rw-r--r--drivers/mtd/nand/raw/sm_common.c (renamed from drivers/mtd/nand/sm_common.c)0
-rw-r--r--drivers/mtd/nand/raw/sm_common.h (renamed from drivers/mtd/nand/sm_common.h)0
-rw-r--r--drivers/mtd/nand/raw/socrates_nand.c (renamed from drivers/mtd/nand/socrates_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/sunxi_nand.c (renamed from drivers/mtd/nand/sunxi_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/tango_nand.c (renamed from drivers/mtd/nand/tango_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/tmio_nand.c (renamed from drivers/mtd/nand/tmio_nand.c)0
-rw-r--r--drivers/mtd/nand/raw/txx9ndfmc.c (renamed from drivers/mtd/nand/txx9ndfmc.c)0
-rw-r--r--drivers/mtd/nand/raw/vf610_nfc.c (renamed from drivers/mtd/nand/vf610_nfc.c)0
-rw-r--r--drivers/mtd/nand/raw/xway_nand.c (renamed from drivers/mtd/nand/xway_nand.c)0
-rw-r--r--drivers/mtd/sm_ftl.c2
98 files changed, 669 insertions, 665 deletions
diff --git a/Documentation/arm/Samsung-S3C24XX/S3C2412.txt b/Documentation/arm/Samsung-S3C24XX/S3C2412.txt
index f057876b920b..dc1fd362d3c1 100644
--- a/Documentation/arm/Samsung-S3C24XX/S3C2412.txt
+++ b/Documentation/arm/Samsung-S3C24XX/S3C2412.txt
@@ -46,7 +46,7 @@ NAND
46---- 46----
47 47
48 The NAND hardware is similar to the S3C2440, and is supported by the 48 The NAND hardware is similar to the S3C2440, and is supported by the
49 s3c2410 driver in the drivers/mtd/nand directory. 49 s3c2410 driver in the drivers/mtd/nand/raw directory.
50 50
51 51
52USB Host 52USB Host
diff --git a/Documentation/driver-api/mtdnand.rst b/Documentation/driver-api/mtdnand.rst
index 2a5191b6d445..dcd63599f700 100644
--- a/Documentation/driver-api/mtdnand.rst
+++ b/Documentation/driver-api/mtdnand.rst
@@ -967,10 +967,10 @@ API functions which are exported. Each function has a short description
967which is marked with an [XXX] identifier. See the chapter "Documentation 967which is marked with an [XXX] identifier. See the chapter "Documentation
968hints" for an explanation. 968hints" for an explanation.
969 969
970.. kernel-doc:: drivers/mtd/nand/nand_base.c 970.. kernel-doc:: drivers/mtd/nand/raw/nand_base.c
971 :export: 971 :export:
972 972
973.. kernel-doc:: drivers/mtd/nand/nand_ecc.c 973.. kernel-doc:: drivers/mtd/nand/raw/nand_ecc.c
974 :export: 974 :export:
975 975
976Internal Functions Provided 976Internal Functions Provided
@@ -982,10 +982,10 @@ marked with an [XXX] identifier. See the chapter "Documentation hints"
982for an explanation. The functions marked with [DEFAULT] might be 982for an explanation. The functions marked with [DEFAULT] might be
983relevant for a board driver developer. 983relevant for a board driver developer.
984 984
985.. kernel-doc:: drivers/mtd/nand/nand_base.c 985.. kernel-doc:: drivers/mtd/nand/raw/nand_base.c
986 :internal: 986 :internal:
987 987
988.. kernel-doc:: drivers/mtd/nand/nand_bbt.c 988.. kernel-doc:: drivers/mtd/nand/raw/nand_bbt.c
989 :internal: 989 :internal:
990 990
991Credits 991Credits
diff --git a/Documentation/gpio/drivers-on-gpio.txt b/Documentation/gpio/drivers-on-gpio.txt
index a2ccbab12eb7..a3e612f55bc7 100644
--- a/Documentation/gpio/drivers-on-gpio.txt
+++ b/Documentation/gpio/drivers-on-gpio.txt
@@ -74,8 +74,8 @@ hardware descriptions such as device tree or ACPI:
74 it from 1-to-0-to-1. If that hardware does not receive its "ping" 74 it from 1-to-0-to-1. If that hardware does not receive its "ping"
75 periodically, it will reset the system. 75 periodically, it will reset the system.
76 76
77- gpio-nand: drivers/mtd/nand/gpio.c is used to connect a NAND flash chip to 77- gpio-nand: drivers/mtd/nand/raw/gpio.c is used to connect a NAND flash chip
78 a set of simple GPIO lines: RDY, NCE, ALE, CLE, NWP. It interacts with the 78 to a set of simple GPIO lines: RDY, NCE, ALE, CLE, NWP. It interacts with the
79 NAND flash MTD subsystem and provides chip access and partition parsing like 79 NAND flash MTD subsystem and provides chip access and partition parsing like
80 any other NAND driving hardware. 80 any other NAND driving hardware.
81 81
diff --git a/MAINTAINERS b/MAINTAINERS
index 3bdc260e36b7..34b2e9ed6d3d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1710,7 +1710,7 @@ F: drivers/input/keyboard/w90p910_keypad.c
1710F: drivers/input/touchscreen/w90p910_ts.c 1710F: drivers/input/touchscreen/w90p910_ts.c
1711F: drivers/watchdog/nuc900_wdt.c 1711F: drivers/watchdog/nuc900_wdt.c
1712F: drivers/net/ethernet/nuvoton/w90p910_ether.c 1712F: drivers/net/ethernet/nuvoton/w90p910_ether.c
1713F: drivers/mtd/nand/nuc900_nand.c 1713F: drivers/mtd/nand/raw/nuc900_nand.c
1714F: drivers/rtc/rtc-nuc900.c 1714F: drivers/rtc/rtc-nuc900.c
1715F: drivers/spi/spi-nuc900.c 1715F: drivers/spi/spi-nuc900.c
1716F: drivers/usb/host/ehci-w90x900.c 1716F: drivers/usb/host/ehci-w90x900.c
@@ -3014,7 +3014,7 @@ M: Kamal Dasu <kdasu.kdev@gmail.com>
3014L: linux-mtd@lists.infradead.org 3014L: linux-mtd@lists.infradead.org
3015L: bcm-kernel-feedback-list@broadcom.com 3015L: bcm-kernel-feedback-list@broadcom.com
3016S: Maintained 3016S: Maintained
3017F: drivers/mtd/nand/brcmnand/ 3017F: drivers/mtd/nand/raw/brcmnand/
3018 3018
3019BROADCOM STB DPFE DRIVER 3019BROADCOM STB DPFE DRIVER
3020M: Markus Mayer <mmayer@broadcom.com> 3020M: Markus Mayer <mmayer@broadcom.com>
@@ -4116,7 +4116,7 @@ DENALI NAND DRIVER
4116M: Masahiro Yamada <yamada.masahiro@socionext.com> 4116M: Masahiro Yamada <yamada.masahiro@socionext.com>
4117L: linux-mtd@lists.infradead.org 4117L: linux-mtd@lists.infradead.org
4118S: Supported 4118S: Supported
4119F: drivers/mtd/nand/denali* 4119F: drivers/mtd/nand/raw/denali*
4120 4120
4121DESIGNWARE USB2 DRD IP DRIVER 4121DESIGNWARE USB2 DRD IP DRIVER
4122M: John Youn <johnyoun@synopsys.com> 4122M: John Youn <johnyoun@synopsys.com>
@@ -5646,7 +5646,7 @@ FREESCALE GPMI NAND DRIVER
5646M: Han Xu <han.xu@nxp.com> 5646M: Han Xu <han.xu@nxp.com>
5647L: linux-mtd@lists.infradead.org 5647L: linux-mtd@lists.infradead.org
5648S: Maintained 5648S: Maintained
5649F: drivers/mtd/nand/gpmi-nand/* 5649F: drivers/mtd/nand/raw/gpmi-nand/*
5650 5650
5651FREESCALE I2C CPM DRIVER 5651FREESCALE I2C CPM DRIVER
5652M: Jochen Friedrich <jochen@scram.de> 5652M: Jochen Friedrich <jochen@scram.de>
@@ -6955,7 +6955,7 @@ INGENIC JZ4780 NAND DRIVER
6955M: Harvey Hunt <harveyhuntnexus@gmail.com> 6955M: Harvey Hunt <harveyhuntnexus@gmail.com>
6956L: linux-mtd@lists.infradead.org 6956L: linux-mtd@lists.infradead.org
6957S: Maintained 6957S: Maintained
6958F: drivers/mtd/nand/jz4780_* 6958F: drivers/mtd/nand/raw/jz4780_*
6959 6959
6960INOTIFY 6960INOTIFY
6961M: Jan Kara <jack@suse.cz> 6961M: Jan Kara <jack@suse.cz>
@@ -8474,7 +8474,7 @@ MARVELL NAND CONTROLLER DRIVER
8474M: Miquel Raynal <miquel.raynal@free-electrons.com> 8474M: Miquel Raynal <miquel.raynal@free-electrons.com>
8475L: linux-mtd@lists.infradead.org 8475L: linux-mtd@lists.infradead.org
8476S: Maintained 8476S: Maintained
8477F: drivers/mtd/nand/marvell_nand.c 8477F: drivers/mtd/nand/raw/marvell_nand.c
8478F: Documentation/devicetree/bindings/mtd/marvell-nand.txt 8478F: Documentation/devicetree/bindings/mtd/marvell-nand.txt
8479 8479
8480MARVELL SOC MMC/SD/SDIO CONTROLLER DRIVER 8480MARVELL SOC MMC/SD/SDIO CONTROLLER DRIVER
@@ -9136,7 +9136,7 @@ M: Wenyou Yang <wenyou.yang@microchip.com>
9136M: Josh Wu <rainyfeeling@outlook.com> 9136M: Josh Wu <rainyfeeling@outlook.com>
9137L: linux-mtd@lists.infradead.org 9137L: linux-mtd@lists.infradead.org
9138S: Supported 9138S: Supported
9139F: drivers/mtd/nand/atmel/* 9139F: drivers/mtd/nand/raw/atmel/*
9140F: Documentation/devicetree/bindings/mtd/atmel-nand.txt 9140F: Documentation/devicetree/bindings/mtd/atmel-nand.txt
9141 9141
9142MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER 9142MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER
@@ -11331,7 +11331,7 @@ PXA3xx NAND FLASH DRIVER
11331M: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> 11331M: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
11332L: linux-mtd@lists.infradead.org 11332L: linux-mtd@lists.infradead.org
11333S: Maintained 11333S: Maintained
11334F: drivers/mtd/nand/pxa3xx_nand.c 11334F: drivers/mtd/nand/raw/pxa3xx_nand.c
11335 11335
11336QAT DRIVER 11336QAT DRIVER
11337M: Giovanni Cabiddu <giovanni.cabiddu@intel.com> 11337M: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
@@ -11815,8 +11815,8 @@ F: drivers/memstick/host/r592.*
11815RICOH SMARTMEDIA/XD DRIVER 11815RICOH SMARTMEDIA/XD DRIVER
11816M: Maxim Levitsky <maximlevitsky@gmail.com> 11816M: Maxim Levitsky <maximlevitsky@gmail.com>
11817S: Maintained 11817S: Maintained
11818F: drivers/mtd/nand/r852.c 11818F: drivers/mtd/nand/raw/r852.c
11819F: drivers/mtd/nand/r852.h 11819F: drivers/mtd/nand/raw/r852.h
11820 11820
11821RISC-V ARCHITECTURE 11821RISC-V ARCHITECTURE
11822M: Palmer Dabbelt <palmer@sifive.com> 11822M: Palmer Dabbelt <palmer@sifive.com>
@@ -14635,7 +14635,7 @@ VF610 NAND DRIVER
14635M: Stefan Agner <stefan@agner.ch> 14635M: Stefan Agner <stefan@agner.ch>
14636L: linux-mtd@lists.infradead.org 14636L: linux-mtd@lists.infradead.org
14637S: Supported 14637S: Supported
14638F: drivers/mtd/nand/vf610_nfc.c 14638F: drivers/mtd/nand/raw/vf610_nfc.c
14639 14639
14640VFAT/FAT/MSDOS FILESYSTEM 14640VFAT/FAT/MSDOS FILESYSTEM
14641M: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> 14641M: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index e6b8c59f2c0d..6d5373471809 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -1,580 +1 @@
1config MTD_NAND_ECC source "drivers/mtd/nand/raw/Kconfig"
2 tristate
3
4config MTD_NAND_ECC_SMC
5 bool "NAND ECC Smart Media byte order"
6 depends on MTD_NAND_ECC
7 default n
8 help
9 Software ECC according to the Smart Media Specification.
10 The original Linux implementation had byte 0 and 1 swapped.
11
12
13menuconfig MTD_NAND
14 tristate "NAND Device Support"
15 depends on MTD
16 select MTD_NAND_ECC
17 help
18 This enables support for accessing all type of NAND flash
19 devices. For further information see
20 <http://www.linux-mtd.infradead.org/doc/nand.html>.
21
22if MTD_NAND
23
24config MTD_NAND_BCH
25 tristate
26 select BCH
27 depends on MTD_NAND_ECC_BCH
28 default MTD_NAND
29
30config MTD_NAND_ECC_BCH
31 bool "Support software BCH ECC"
32 default n
33 help
34 This enables support for software BCH error correction. Binary BCH
35 codes are more powerful and cpu intensive than traditional Hamming
36 ECC codes. They are used with NAND devices requiring more than 1 bit
37 of error correction.
38
39config MTD_SM_COMMON
40 tristate
41 default n
42
43config MTD_NAND_DENALI
44 tristate
45
46config MTD_NAND_DENALI_PCI
47 tristate "Support Denali NAND controller on Intel Moorestown"
48 select MTD_NAND_DENALI
49 depends on HAS_DMA && PCI
50 help
51 Enable the driver for NAND flash on Intel Moorestown, using the
52 Denali NAND controller core.
53
54config MTD_NAND_DENALI_DT
55 tristate "Support Denali NAND controller as a DT device"
56 select MTD_NAND_DENALI
57 depends on HAS_DMA && HAVE_CLK && OF
58 help
59 Enable the driver for NAND flash on platforms using a Denali NAND
60 controller as a DT device.
61
62config MTD_NAND_GPIO
63 tristate "GPIO assisted NAND Flash driver"
64 depends on GPIOLIB || COMPILE_TEST
65 depends on HAS_IOMEM
66 help
67 This enables a NAND flash driver where control signals are
68 connected to GPIO pins, and commands and data are communicated
69 via a memory mapped interface.
70
71config MTD_NAND_AMS_DELTA
72 tristate "NAND Flash device on Amstrad E3"
73 depends on MACH_AMS_DELTA
74 default y
75 help
76 Support for NAND flash on Amstrad E3 (Delta).
77
78config MTD_NAND_OMAP2
79 tristate "NAND Flash device on OMAP2, OMAP3, OMAP4 and Keystone"
80 depends on (ARCH_OMAP2PLUS || ARCH_KEYSTONE)
81 help
82 Support for NAND flash on Texas Instruments OMAP2, OMAP3, OMAP4
83 and Keystone platforms.
84
85config MTD_NAND_OMAP_BCH
86 depends on MTD_NAND_OMAP2
87 bool "Support hardware based BCH error correction"
88 default n
89 select BCH
90 help
91 This config enables the ELM hardware engine, which can be used to
92 locate and correct errors when using BCH ECC scheme. This offloads
93 the cpu from doing ECC error searching and correction. However some
94 legacy OMAP families like OMAP2xxx, OMAP3xxx do not have ELM engine
95 so this is optional for them.
96
97config MTD_NAND_OMAP_BCH_BUILD
98 def_tristate MTD_NAND_OMAP2 && MTD_NAND_OMAP_BCH
99
100config MTD_NAND_RICOH
101 tristate "Ricoh xD card reader"
102 default n
103 depends on PCI
104 select MTD_SM_COMMON
105 help
106 Enable support for Ricoh R5C852 xD card reader
107 You also need to enable ether
108 NAND SSFDC (SmartMedia) read only translation layer' or new
109 expermental, readwrite
110 'SmartMedia/xD new translation layer'
111
112config MTD_NAND_AU1550
113 tristate "Au1550/1200 NAND support"
114 depends on MIPS_ALCHEMY
115 help
116 This enables the driver for the NAND flash controller on the
117 AMD/Alchemy 1550 SOC.
118
119config MTD_NAND_BF5XX
120 tristate "Blackfin on-chip NAND Flash Controller driver"
121 depends on BF54x || BF52x
122 help
123 This enables the Blackfin on-chip NAND flash controller
124
125 No board specific support is done by this driver, each board
126 must advertise a platform_device for the driver to attach.
127
128 This driver can also be built as a module. If so, the module
129 will be called bf5xx-nand.
130
131config MTD_NAND_BF5XX_HWECC
132 bool "BF5XX NAND Hardware ECC"
133 default y
134 depends on MTD_NAND_BF5XX
135 help
136 Enable the use of the BF5XX's internal ECC generator when
137 using NAND.
138
139config MTD_NAND_BF5XX_BOOTROM_ECC
140 bool "Use Blackfin BootROM ECC Layout"
141 default n
142 depends on MTD_NAND_BF5XX_HWECC
143 help
144 If you wish to modify NAND pages and allow the Blackfin on-chip
145 BootROM to boot from them, say Y here. This is only necessary
146 if you are booting U-Boot out of NAND and you wish to update
147 U-Boot from Linux' userspace. Otherwise, you should say N here.
148
149 If unsure, say N.
150
151config MTD_NAND_S3C2410
152 tristate "NAND Flash support for Samsung S3C SoCs"
153 depends on ARCH_S3C24XX || ARCH_S3C64XX
154 help
155 This enables the NAND flash controller on the S3C24xx and S3C64xx
156 SoCs
157
158 No board specific support is done by this driver, each board
159 must advertise a platform_device for the driver to attach.
160
161config MTD_NAND_S3C2410_DEBUG
162 bool "Samsung S3C NAND driver debug"
163 depends on MTD_NAND_S3C2410
164 help
165 Enable debugging of the S3C NAND driver
166
167config MTD_NAND_NDFC
168 tristate "NDFC NanD Flash Controller"
169 depends on 4xx
170 select MTD_NAND_ECC_SMC
171 help
172 NDFC Nand Flash Controllers are integrated in IBM/AMCC's 4xx SoCs
173
174config MTD_NAND_S3C2410_CLKSTOP
175 bool "Samsung S3C NAND IDLE clock stop"
176 depends on MTD_NAND_S3C2410
177 default n
178 help
179 Stop the clock to the NAND controller when there is no chip
180 selected to save power. This will mean there is a small delay
181 when the is NAND chip selected or released, but will save
182 approximately 5mA of power when there is nothing happening.
183
184config MTD_NAND_TANGO
185 tristate "NAND Flash support for Tango chips"
186 depends on ARCH_TANGO || COMPILE_TEST
187 depends on HAS_DMA
188 help
189 Enables the NAND Flash controller on Tango chips.
190
191config MTD_NAND_DISKONCHIP
192 tristate "DiskOnChip 2000, Millennium and Millennium Plus (NAND reimplementation)"
193 depends on HAS_IOMEM
194 select REED_SOLOMON
195 select REED_SOLOMON_DEC16
196 help
197 This is a reimplementation of M-Systems DiskOnChip 2000,
198 Millennium and Millennium Plus as a standard NAND device driver,
199 as opposed to the earlier self-contained MTD device drivers.
200 This should enable, among other things, proper JFFS2 operation on
201 these devices.
202
203config MTD_NAND_DISKONCHIP_PROBE_ADVANCED
204 bool "Advanced detection options for DiskOnChip"
205 depends on MTD_NAND_DISKONCHIP
206 help
207 This option allows you to specify nonstandard address at which to
208 probe for a DiskOnChip, or to change the detection options. You
209 are unlikely to need any of this unless you are using LinuxBIOS.
210 Say 'N'.
211
212config MTD_NAND_DISKONCHIP_PROBE_ADDRESS
213 hex "Physical address of DiskOnChip" if MTD_NAND_DISKONCHIP_PROBE_ADVANCED
214 depends on MTD_NAND_DISKONCHIP
215 default "0"
216 ---help---
217 By default, the probe for DiskOnChip devices will look for a
218 DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
219 This option allows you to specify a single address at which to probe
220 for the device, which is useful if you have other devices in that
221 range which get upset when they are probed.
222
223 (Note that on PowerPC, the normal probe will only check at
224 0xE4000000.)
225
226 Normally, you should leave this set to zero, to allow the probe at
227 the normal addresses.
228
229config MTD_NAND_DISKONCHIP_PROBE_HIGH
230 bool "Probe high addresses"
231 depends on MTD_NAND_DISKONCHIP_PROBE_ADVANCED
232 help
233 By default, the probe for DiskOnChip devices will look for a
234 DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
235 This option changes to make it probe between 0xFFFC8000 and
236 0xFFFEE000. Unless you are using LinuxBIOS, this is unlikely to be
237 useful to you. Say 'N'.
238
239config MTD_NAND_DISKONCHIP_BBTWRITE
240 bool "Allow BBT writes on DiskOnChip Millennium and 2000TSOP"
241 depends on MTD_NAND_DISKONCHIP
242 help
243 On DiskOnChip devices shipped with the INFTL filesystem (Millennium
244 and 2000 TSOP/Alon), Linux reserves some space at the end of the
245 device for the Bad Block Table (BBT). If you have existing INFTL
246 data on your device (created by non-Linux tools such as M-Systems'
247 DOS drivers), your data might overlap the area Linux wants to use for
248 the BBT. If this is a concern for you, leave this option disabled and
249 Linux will not write BBT data into this area.
250 The downside of leaving this option disabled is that if bad blocks
251 are detected by Linux, they will not be recorded in the BBT, which
252 could cause future problems.
253 Once you enable this option, new filesystems (INFTL or others, created
254 in Linux or other operating systems) will not use the reserved area.
255 The only reason not to enable this option is to prevent damage to
256 preexisting filesystems.
257 Even if you leave this disabled, you can enable BBT writes at module
258 load time (assuming you build diskonchip as a module) with the module
259 parameter "inftl_bbt_write=1".
260
261config MTD_NAND_DOCG4
262 tristate "Support for DiskOnChip G4"
263 depends on HAS_IOMEM
264 select BCH
265 select BITREVERSE
266 help
267 Support for diskonchip G4 nand flash, found in various smartphones and
268 PDAs, among them the Palm Treo680, HTC Prophet and Wizard, Toshiba
269 Portege G900, Asus P526, and O2 XDA Zinc.
270
271 With this driver you will be able to use UBI and create a ubifs on the
272 device, so you may wish to consider enabling UBI and UBIFS as well.
273
274 These devices ship with the Mys/Sandisk SAFTL formatting, for which
275 there is currently no mtd parser, so you may want to use command line
276 partitioning to segregate write-protected blocks. On the Treo680, the
277 first five erase blocks (256KiB each) are write-protected, followed
278 by the block containing the saftl partition table. This is probably
279 typical.
280
281config MTD_NAND_SHARPSL
282 tristate "Support for NAND Flash on Sharp SL Series (C7xx + others)"
283 depends on ARCH_PXA
284
285config MTD_NAND_CAFE
286 tristate "NAND support for OLPC CAFÉ chip"
287 depends on PCI
288 select REED_SOLOMON
289 select REED_SOLOMON_DEC16
290 help
291 Use NAND flash attached to the CAFÉ chip designed for the OLPC
292 laptop.
293
294config MTD_NAND_CS553X
295 tristate "NAND support for CS5535/CS5536 (AMD Geode companion chip)"
296 depends on X86_32
297 depends on !UML && HAS_IOMEM
298 help
299 The CS553x companion chips for the AMD Geode processor
300 include NAND flash controllers with built-in hardware ECC
301 capabilities; enabling this option will allow you to use
302 these. The driver will check the MSRs to verify that the
303 controller is enabled for NAND, and currently requires that
304 the controller be in MMIO mode.
305
306 If you say "m", the module will be called cs553x_nand.
307
308config MTD_NAND_ATMEL
309 tristate "Support for NAND Flash / SmartMedia on AT91"
310 depends on ARCH_AT91
311 select MFD_ATMEL_SMC
312 help
313 Enables support for NAND Flash / Smart Media Card interface
314 on Atmel AT91 processors.
315
316config MTD_NAND_PXA3xx
317 tristate "NAND support on PXA3xx and Armada 370/XP"
318 depends on !MTD_NAND_MARVELL
319 depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU
320 help
321
322 This enables the driver for the NAND flash device found on
323 PXA3xx processors (NFCv1) and also on 32-bit Armada
324 platforms (XP, 370, 375, 38x, 39x) and 64-bit Armada
325 platforms (7K, 8K) (NFCv2).
326
327config MTD_NAND_MARVELL
328 tristate "NAND controller support on Marvell boards"
329 depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU || \
330 COMPILE_TEST
331 depends on HAS_IOMEM
332 help
333 This enables the NAND flash controller driver for Marvell boards,
334 including:
335 - PXA3xx processors (NFCv1)
336 - 32-bit Armada platforms (XP, 37x, 38x, 39x) (NFCv2)
337 - 64-bit Aramda platforms (7k, 8k) (NFCv2)
338
339config MTD_NAND_SLC_LPC32XX
340 tristate "NXP LPC32xx SLC Controller"
341 depends on ARCH_LPC32XX
342 help
343 Enables support for NXP's LPC32XX SLC (i.e. for Single Level Cell
344 chips) NAND controller. This is the default for the PHYTEC 3250
345 reference board which contains a NAND256R3A2CZA6 chip.
346
347 Please check the actual NAND chip connected and its support
348 by the SLC NAND controller.
349
350config MTD_NAND_MLC_LPC32XX
351 tristate "NXP LPC32xx MLC Controller"
352 depends on ARCH_LPC32XX
353 help
354 Uses the LPC32XX MLC (i.e. for Multi Level Cell chips) NAND
355 controller. This is the default for the WORK92105 controller
356 board.
357
358 Please check the actual NAND chip connected and its support
359 by the MLC NAND controller.
360
361config MTD_NAND_CM_X270
362 tristate "Support for NAND Flash on CM-X270 modules"
363 depends on MACH_ARMCORE
364
365config MTD_NAND_PASEMI
366 tristate "NAND support for PA Semi PWRficient"
367 depends on PPC_PASEMI
368 help
369 Enables support for NAND Flash interface on PA Semi PWRficient
370 based boards
371
372config MTD_NAND_TMIO
373 tristate "NAND Flash device on Toshiba Mobile IO Controller"
374 depends on MFD_TMIO
375 help
376 Support for NAND flash connected to a Toshiba Mobile IO
377 Controller in some PDAs, including the Sharp SL6000x.
378
379config MTD_NAND_NANDSIM
380 tristate "Support for NAND Flash Simulator"
381 help
382 The simulator may simulate various NAND flash chips for the
383 MTD nand layer.
384
385config MTD_NAND_GPMI_NAND
386 tristate "GPMI NAND Flash Controller driver"
387 depends on MTD_NAND && MXS_DMA
388 help
389 Enables NAND Flash support for IMX23, IMX28 or IMX6.
390 The GPMI controller is very powerful, with the help of BCH
391 module, it can do the hardware ECC. The GPMI supports several
392 NAND flashs at the same time.
393
394config MTD_NAND_BRCMNAND
395 tristate "Broadcom STB NAND controller"
396 depends on ARM || ARM64 || MIPS
397 help
398 Enables the Broadcom NAND controller driver. The controller was
399 originally designed for Set-Top Box but is used on various BCM7xxx,
400 BCM3xxx, BCM63xxx, iProc/Cygnus and more.
401
402config MTD_NAND_BCM47XXNFLASH
403 tristate "Support for NAND flash on BCM4706 BCMA bus"
404 depends on BCMA_NFLASH
405 help
406 BCMA bus can have various flash memories attached, they are
407 registered by bcma as platform devices. This enables driver for
408 NAND flash memories. For now only BCM4706 is supported.
409
410config MTD_NAND_PLATFORM
411 tristate "Support for generic platform NAND driver"
412 depends on HAS_IOMEM
413 help
414 This implements a generic NAND driver for on-SOC platform
415 devices. You will need to provide platform-specific functions
416 via platform_data.
417
418config MTD_NAND_ORION
419 tristate "NAND Flash support for Marvell Orion SoC"
420 depends on PLAT_ORION
421 help
422 This enables the NAND flash controller on Orion machines.
423
424 No board specific support is done by this driver, each board
425 must advertise a platform_device for the driver to attach.
426
427config MTD_NAND_OXNAS
428 tristate "NAND Flash support for Oxford Semiconductor SoC"
429 depends on ARCH_OXNAS || COMPILE_TEST
430 depends on HAS_IOMEM
431 help
432 This enables the NAND flash controller on Oxford Semiconductor SoCs.
433
434config MTD_NAND_FSL_ELBC
435 tristate "NAND support for Freescale eLBC controllers"
436 depends on FSL_SOC
437 select FSL_LBC
438 help
439 Various Freescale chips, including the 8313, include a NAND Flash
440 Controller Module with built-in hardware ECC capabilities.
441 Enabling this option will enable you to use this to control
442 external NAND devices.
443
444config MTD_NAND_FSL_IFC
445 tristate "NAND support for Freescale IFC controller"
446 depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A
447 select FSL_IFC
448 select MEMORY
449 help
450 Various Freescale chips e.g P1010, include a NAND Flash machine
451 with built-in hardware ECC capabilities.
452 Enabling this option will enable you to use this to control
453 external NAND devices.
454
455config MTD_NAND_FSL_UPM
456 tristate "Support for NAND on Freescale UPM"
457 depends on PPC_83xx || PPC_85xx
458 select FSL_LBC
459 help
460 Enables support for NAND Flash chips wired onto Freescale PowerPC
461 processor localbus with User-Programmable Machine support.
462
463config MTD_NAND_MPC5121_NFC
464 tristate "MPC5121 built-in NAND Flash Controller support"
465 depends on PPC_MPC512x
466 help
467 This enables the driver for the NAND flash controller on the
468 MPC5121 SoC.
469
470config MTD_NAND_VF610_NFC
471 tristate "Support for Freescale NFC for VF610/MPC5125"
472 depends on (SOC_VF610 || COMPILE_TEST)
473 depends on HAS_IOMEM
474 help
475 Enables support for NAND Flash Controller on some Freescale
476 processors like the VF610, MPC5125, MCF54418 or Kinetis K70.
477 The driver supports a maximum 2k page size. With 2k pages and
478 64 bytes or more of OOB, hardware ECC with up to 32-bit error
479 correction is supported. Hardware ECC is only enabled through
480 device tree.
481
482config MTD_NAND_MXC
483 tristate "MXC NAND support"
484 depends on ARCH_MXC
485 help
486 This enables the driver for the NAND flash controller on the
487 MXC processors.
488
489config MTD_NAND_SH_FLCTL
490 tristate "Support for NAND on Renesas SuperH FLCTL"
491 depends on SUPERH || COMPILE_TEST
492 depends on HAS_IOMEM
493 depends on HAS_DMA
494 help
495 Several Renesas SuperH CPU has FLCTL. This option enables support
496 for NAND Flash using FLCTL.
497
498config MTD_NAND_DAVINCI
499 tristate "Support NAND on DaVinci/Keystone SoC"
500 depends on ARCH_DAVINCI || (ARCH_KEYSTONE && TI_AEMIF)
501 help
502 Enable the driver for NAND flash chips on Texas Instruments
503 DaVinci/Keystone processors.
504
505config MTD_NAND_TXX9NDFMC
506 tristate "NAND Flash support for TXx9 SoC"
507 depends on SOC_TX4938 || SOC_TX4939
508 help
509 This enables the NAND flash controller on the TXx9 SoCs.
510
511config MTD_NAND_SOCRATES
512 tristate "Support for NAND on Socrates board"
513 depends on SOCRATES
514 help
515 Enables support for NAND Flash chips wired onto Socrates board.
516
517config MTD_NAND_NUC900
518 tristate "Support for NAND on Nuvoton NUC9xx/w90p910 evaluation boards."
519 depends on ARCH_W90X900
520 help
521 This enables the driver for the NAND Flash on evaluation board based
522 on w90p910 / NUC9xx.
523
524config MTD_NAND_JZ4740
525 tristate "Support for JZ4740 SoC NAND controller"
526 depends on MACH_JZ4740
527 help
528 Enables support for NAND Flash on JZ4740 SoC based boards.
529
530config MTD_NAND_JZ4780
531 tristate "Support for NAND on JZ4780 SoC"
532 depends on MACH_JZ4780 && JZ4780_NEMC
533 help
534 Enables support for NAND Flash connected to the NEMC on JZ4780 SoC
535 based boards, using the BCH controller for hardware error correction.
536
537config MTD_NAND_FSMC
538 tristate "Support for NAND on ST Micros FSMC"
539 depends on OF
540 depends on PLAT_SPEAR || ARCH_NOMADIK || ARCH_U8500 || MACH_U300
541 help
542 Enables support for NAND Flash chips on the ST Microelectronics
543 Flexible Static Memory Controller (FSMC)
544
545config MTD_NAND_XWAY
546 bool "Support for NAND on Lantiq XWAY SoC"
547 depends on LANTIQ && SOC_TYPE_XWAY
548 help
549 Enables support for NAND Flash chips on Lantiq XWAY SoCs. NAND is attached
550 to the External Bus Unit (EBU).
551
552config MTD_NAND_SUNXI
553 tristate "Support for NAND on Allwinner SoCs"
554 depends on ARCH_SUNXI
555 help
556 Enables support for NAND Flash chips on Allwinner SoCs.
557
558config MTD_NAND_HISI504
559 tristate "Support for NAND controller on Hisilicon SoC Hip04"
560 depends on ARCH_HISI || COMPILE_TEST
561 depends on HAS_DMA
562 help
563 Enables support for NAND controller on Hisilicon SoC Hip04.
564
565config MTD_NAND_QCOM
566 tristate "Support for NAND on QCOM SoCs"
567 depends on ARCH_QCOM
568 help
569 Enables support for NAND flash chips on SoCs containing the EBI2 NAND
570 controller. This controller is found on IPQ806x SoC.
571
572config MTD_NAND_MTK
573 tristate "Support for NAND controller on MTK SoCs"
574 depends on ARCH_MEDIATEK || COMPILE_TEST
575 depends on HAS_DMA
576 help
577 Enables support for NAND controller on MTK SoCs.
578 This controller is found on mt27xx, mt81xx, mt65xx SoCs.
579
580endif # MTD_NAND
diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile
index 4e0982476267..32af7168c5ba 100644
--- a/drivers/mtd/nand/Makefile
+++ b/drivers/mtd/nand/Makefile
@@ -1,68 +1,3 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2 2
3obj-$(CONFIG_MTD_NAND) += nand.o 3obj-y += raw/
4obj-$(CONFIG_MTD_NAND_ECC) += nand_ecc.o
5obj-$(CONFIG_MTD_NAND_BCH) += nand_bch.o
6obj-$(CONFIG_MTD_SM_COMMON) += sm_common.o
7
8obj-$(CONFIG_MTD_NAND_CAFE) += cafe_nand.o
9obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o
10obj-$(CONFIG_MTD_NAND_DENALI) += denali.o
11obj-$(CONFIG_MTD_NAND_DENALI_PCI) += denali_pci.o
12obj-$(CONFIG_MTD_NAND_DENALI_DT) += denali_dt.o
13obj-$(CONFIG_MTD_NAND_AU1550) += au1550nd.o
14obj-$(CONFIG_MTD_NAND_BF5XX) += bf5xx_nand.o
15obj-$(CONFIG_MTD_NAND_S3C2410) += s3c2410.o
16obj-$(CONFIG_MTD_NAND_TANGO) += tango_nand.o
17obj-$(CONFIG_MTD_NAND_DAVINCI) += davinci_nand.o
18obj-$(CONFIG_MTD_NAND_DISKONCHIP) += diskonchip.o
19obj-$(CONFIG_MTD_NAND_DOCG4) += docg4.o
20obj-$(CONFIG_MTD_NAND_FSMC) += fsmc_nand.o
21obj-$(CONFIG_MTD_NAND_SHARPSL) += sharpsl.o
22obj-$(CONFIG_MTD_NAND_NANDSIM) += nandsim.o
23obj-$(CONFIG_MTD_NAND_CS553X) += cs553x_nand.o
24obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o
25obj-$(CONFIG_MTD_NAND_ATMEL) += atmel/
26obj-$(CONFIG_MTD_NAND_GPIO) += gpio.o
27omap2_nand-objs := omap2.o
28obj-$(CONFIG_MTD_NAND_OMAP2) += omap2_nand.o
29obj-$(CONFIG_MTD_NAND_OMAP_BCH_BUILD) += omap_elm.o
30obj-$(CONFIG_MTD_NAND_CM_X270) += cmx270_nand.o
31obj-$(CONFIG_MTD_NAND_PXA3xx) += pxa3xx_nand.o
32obj-$(CONFIG_MTD_NAND_MARVELL) += marvell_nand.o
33obj-$(CONFIG_MTD_NAND_TMIO) += tmio_nand.o
34obj-$(CONFIG_MTD_NAND_PLATFORM) += plat_nand.o
35obj-$(CONFIG_MTD_NAND_PASEMI) += pasemi_nand.o
36obj-$(CONFIG_MTD_NAND_ORION) += orion_nand.o
37obj-$(CONFIG_MTD_NAND_OXNAS) += oxnas_nand.o
38obj-$(CONFIG_MTD_NAND_FSL_ELBC) += fsl_elbc_nand.o
39obj-$(CONFIG_MTD_NAND_FSL_IFC) += fsl_ifc_nand.o
40obj-$(CONFIG_MTD_NAND_FSL_UPM) += fsl_upm.o
41obj-$(CONFIG_MTD_NAND_SLC_LPC32XX) += lpc32xx_slc.o
42obj-$(CONFIG_MTD_NAND_MLC_LPC32XX) += lpc32xx_mlc.o
43obj-$(CONFIG_MTD_NAND_SH_FLCTL) += sh_flctl.o
44obj-$(CONFIG_MTD_NAND_MXC) += mxc_nand.o
45obj-$(CONFIG_MTD_NAND_SOCRATES) += socrates_nand.o
46obj-$(CONFIG_MTD_NAND_TXX9NDFMC) += txx9ndfmc.o
47obj-$(CONFIG_MTD_NAND_NUC900) += nuc900_nand.o
48obj-$(CONFIG_MTD_NAND_MPC5121_NFC) += mpc5121_nfc.o
49obj-$(CONFIG_MTD_NAND_VF610_NFC) += vf610_nfc.o
50obj-$(CONFIG_MTD_NAND_RICOH) += r852.o
51obj-$(CONFIG_MTD_NAND_JZ4740) += jz4740_nand.o
52obj-$(CONFIG_MTD_NAND_JZ4780) += jz4780_nand.o jz4780_bch.o
53obj-$(CONFIG_MTD_NAND_GPMI_NAND) += gpmi-nand/
54obj-$(CONFIG_MTD_NAND_XWAY) += xway_nand.o
55obj-$(CONFIG_MTD_NAND_BCM47XXNFLASH) += bcm47xxnflash/
56obj-$(CONFIG_MTD_NAND_SUNXI) += sunxi_nand.o
57obj-$(CONFIG_MTD_NAND_HISI504) += hisi504_nand.o
58obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmnand/
59obj-$(CONFIG_MTD_NAND_QCOM) += qcom_nandc.o
60obj-$(CONFIG_MTD_NAND_MTK) += mtk_ecc.o mtk_nand.o
61
62nand-objs := nand_base.o nand_bbt.o nand_timings.o nand_ids.o
63nand-objs += nand_amd.o
64nand-objs += nand_hynix.o
65nand-objs += nand_macronix.o
66nand-objs += nand_micron.o
67nand-objs += nand_samsung.o
68nand-objs += nand_toshiba.o
diff --git a/drivers/mtd/nand/raw/Kconfig b/drivers/mtd/nand/raw/Kconfig
new file mode 100644
index 000000000000..e6b8c59f2c0d
--- /dev/null
+++ b/drivers/mtd/nand/raw/Kconfig
@@ -0,0 +1,580 @@
1config MTD_NAND_ECC
2 tristate
3
4config MTD_NAND_ECC_SMC
5 bool "NAND ECC Smart Media byte order"
6 depends on MTD_NAND_ECC
7 default n
8 help
9 Software ECC according to the Smart Media Specification.
10 The original Linux implementation had byte 0 and 1 swapped.
11
12
13menuconfig MTD_NAND
14 tristate "NAND Device Support"
15 depends on MTD
16 select MTD_NAND_ECC
17 help
18 This enables support for accessing all type of NAND flash
19 devices. For further information see
20 <http://www.linux-mtd.infradead.org/doc/nand.html>.
21
22if MTD_NAND
23
24config MTD_NAND_BCH
25 tristate
26 select BCH
27 depends on MTD_NAND_ECC_BCH
28 default MTD_NAND
29
30config MTD_NAND_ECC_BCH
31 bool "Support software BCH ECC"
32 default n
33 help
34 This enables support for software BCH error correction. Binary BCH
35 codes are more powerful and cpu intensive than traditional Hamming
36 ECC codes. They are used with NAND devices requiring more than 1 bit
37 of error correction.
38
39config MTD_SM_COMMON
40 tristate
41 default n
42
43config MTD_NAND_DENALI
44 tristate
45
46config MTD_NAND_DENALI_PCI
47 tristate "Support Denali NAND controller on Intel Moorestown"
48 select MTD_NAND_DENALI
49 depends on HAS_DMA && PCI
50 help
51 Enable the driver for NAND flash on Intel Moorestown, using the
52 Denali NAND controller core.
53
54config MTD_NAND_DENALI_DT
55 tristate "Support Denali NAND controller as a DT device"
56 select MTD_NAND_DENALI
57 depends on HAS_DMA && HAVE_CLK && OF
58 help
59 Enable the driver for NAND flash on platforms using a Denali NAND
60 controller as a DT device.
61
62config MTD_NAND_GPIO
63 tristate "GPIO assisted NAND Flash driver"
64 depends on GPIOLIB || COMPILE_TEST
65 depends on HAS_IOMEM
66 help
67 This enables a NAND flash driver where control signals are
68 connected to GPIO pins, and commands and data are communicated
69 via a memory mapped interface.
70
71config MTD_NAND_AMS_DELTA
72 tristate "NAND Flash device on Amstrad E3"
73 depends on MACH_AMS_DELTA
74 default y
75 help
76 Support for NAND flash on Amstrad E3 (Delta).
77
78config MTD_NAND_OMAP2
79 tristate "NAND Flash device on OMAP2, OMAP3, OMAP4 and Keystone"
80 depends on (ARCH_OMAP2PLUS || ARCH_KEYSTONE)
81 help
82 Support for NAND flash on Texas Instruments OMAP2, OMAP3, OMAP4
83 and Keystone platforms.
84
85config MTD_NAND_OMAP_BCH
86 depends on MTD_NAND_OMAP2
87 bool "Support hardware based BCH error correction"
88 default n
89 select BCH
90 help
91 This config enables the ELM hardware engine, which can be used to
92 locate and correct errors when using BCH ECC scheme. This offloads
93 the cpu from doing ECC error searching and correction. However some
94 legacy OMAP families like OMAP2xxx, OMAP3xxx do not have ELM engine
95 so this is optional for them.
96
97config MTD_NAND_OMAP_BCH_BUILD
98 def_tristate MTD_NAND_OMAP2 && MTD_NAND_OMAP_BCH
99
100config MTD_NAND_RICOH
101 tristate "Ricoh xD card reader"
102 default n
103 depends on PCI
104 select MTD_SM_COMMON
105 help
106 Enable support for Ricoh R5C852 xD card reader
107 You also need to enable ether
108 NAND SSFDC (SmartMedia) read only translation layer' or new
109 expermental, readwrite
110 'SmartMedia/xD new translation layer'
111
112config MTD_NAND_AU1550
113 tristate "Au1550/1200 NAND support"
114 depends on MIPS_ALCHEMY
115 help
116 This enables the driver for the NAND flash controller on the
117 AMD/Alchemy 1550 SOC.
118
119config MTD_NAND_BF5XX
120 tristate "Blackfin on-chip NAND Flash Controller driver"
121 depends on BF54x || BF52x
122 help
123 This enables the Blackfin on-chip NAND flash controller
124
125 No board specific support is done by this driver, each board
126 must advertise a platform_device for the driver to attach.
127
128 This driver can also be built as a module. If so, the module
129 will be called bf5xx-nand.
130
131config MTD_NAND_BF5XX_HWECC
132 bool "BF5XX NAND Hardware ECC"
133 default y
134 depends on MTD_NAND_BF5XX
135 help
136 Enable the use of the BF5XX's internal ECC generator when
137 using NAND.
138
139config MTD_NAND_BF5XX_BOOTROM_ECC
140 bool "Use Blackfin BootROM ECC Layout"
141 default n
142 depends on MTD_NAND_BF5XX_HWECC
143 help
144 If you wish to modify NAND pages and allow the Blackfin on-chip
145 BootROM to boot from them, say Y here. This is only necessary
146 if you are booting U-Boot out of NAND and you wish to update
147 U-Boot from Linux' userspace. Otherwise, you should say N here.
148
149 If unsure, say N.
150
151config MTD_NAND_S3C2410
152 tristate "NAND Flash support for Samsung S3C SoCs"
153 depends on ARCH_S3C24XX || ARCH_S3C64XX
154 help
155 This enables the NAND flash controller on the S3C24xx and S3C64xx
156 SoCs
157
158 No board specific support is done by this driver, each board
159 must advertise a platform_device for the driver to attach.
160
161config MTD_NAND_S3C2410_DEBUG
162 bool "Samsung S3C NAND driver debug"
163 depends on MTD_NAND_S3C2410
164 help
165 Enable debugging of the S3C NAND driver
166
167config MTD_NAND_NDFC
168 tristate "NDFC NanD Flash Controller"
169 depends on 4xx
170 select MTD_NAND_ECC_SMC
171 help
172 NDFC Nand Flash Controllers are integrated in IBM/AMCC's 4xx SoCs
173
174config MTD_NAND_S3C2410_CLKSTOP
175 bool "Samsung S3C NAND IDLE clock stop"
176 depends on MTD_NAND_S3C2410
177 default n
178 help
179 Stop the clock to the NAND controller when there is no chip
180 selected to save power. This will mean there is a small delay
181 when the is NAND chip selected or released, but will save
182 approximately 5mA of power when there is nothing happening.
183
184config MTD_NAND_TANGO
185 tristate "NAND Flash support for Tango chips"
186 depends on ARCH_TANGO || COMPILE_TEST
187 depends on HAS_DMA
188 help
189 Enables the NAND Flash controller on Tango chips.
190
191config MTD_NAND_DISKONCHIP
192 tristate "DiskOnChip 2000, Millennium and Millennium Plus (NAND reimplementation)"
193 depends on HAS_IOMEM
194 select REED_SOLOMON
195 select REED_SOLOMON_DEC16
196 help
197 This is a reimplementation of M-Systems DiskOnChip 2000,
198 Millennium and Millennium Plus as a standard NAND device driver,
199 as opposed to the earlier self-contained MTD device drivers.
200 This should enable, among other things, proper JFFS2 operation on
201 these devices.
202
203config MTD_NAND_DISKONCHIP_PROBE_ADVANCED
204 bool "Advanced detection options for DiskOnChip"
205 depends on MTD_NAND_DISKONCHIP
206 help
207 This option allows you to specify nonstandard address at which to
208 probe for a DiskOnChip, or to change the detection options. You
209 are unlikely to need any of this unless you are using LinuxBIOS.
210 Say 'N'.
211
212config MTD_NAND_DISKONCHIP_PROBE_ADDRESS
213 hex "Physical address of DiskOnChip" if MTD_NAND_DISKONCHIP_PROBE_ADVANCED
214 depends on MTD_NAND_DISKONCHIP
215 default "0"
216 ---help---
217 By default, the probe for DiskOnChip devices will look for a
218 DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
219 This option allows you to specify a single address at which to probe
220 for the device, which is useful if you have other devices in that
221 range which get upset when they are probed.
222
223 (Note that on PowerPC, the normal probe will only check at
224 0xE4000000.)
225
226 Normally, you should leave this set to zero, to allow the probe at
227 the normal addresses.
228
229config MTD_NAND_DISKONCHIP_PROBE_HIGH
230 bool "Probe high addresses"
231 depends on MTD_NAND_DISKONCHIP_PROBE_ADVANCED
232 help
233 By default, the probe for DiskOnChip devices will look for a
234 DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
235 This option changes to make it probe between 0xFFFC8000 and
236 0xFFFEE000. Unless you are using LinuxBIOS, this is unlikely to be
237 useful to you. Say 'N'.
238
239config MTD_NAND_DISKONCHIP_BBTWRITE
240 bool "Allow BBT writes on DiskOnChip Millennium and 2000TSOP"
241 depends on MTD_NAND_DISKONCHIP
242 help
243 On DiskOnChip devices shipped with the INFTL filesystem (Millennium
244 and 2000 TSOP/Alon), Linux reserves some space at the end of the
245 device for the Bad Block Table (BBT). If you have existing INFTL
246 data on your device (created by non-Linux tools such as M-Systems'
247 DOS drivers), your data might overlap the area Linux wants to use for
248 the BBT. If this is a concern for you, leave this option disabled and
249 Linux will not write BBT data into this area.
250 The downside of leaving this option disabled is that if bad blocks
251 are detected by Linux, they will not be recorded in the BBT, which
252 could cause future problems.
253 Once you enable this option, new filesystems (INFTL or others, created
254 in Linux or other operating systems) will not use the reserved area.
255 The only reason not to enable this option is to prevent damage to
256 preexisting filesystems.
257 Even if you leave this disabled, you can enable BBT writes at module
258 load time (assuming you build diskonchip as a module) with the module
259 parameter "inftl_bbt_write=1".
260
261config MTD_NAND_DOCG4
262 tristate "Support for DiskOnChip G4"
263 depends on HAS_IOMEM
264 select BCH
265 select BITREVERSE
266 help
267 Support for diskonchip G4 nand flash, found in various smartphones and
268 PDAs, among them the Palm Treo680, HTC Prophet and Wizard, Toshiba
269 Portege G900, Asus P526, and O2 XDA Zinc.
270
271 With this driver you will be able to use UBI and create a ubifs on the
272 device, so you may wish to consider enabling UBI and UBIFS as well.
273
274 These devices ship with the Mys/Sandisk SAFTL formatting, for which
275 there is currently no mtd parser, so you may want to use command line
276 partitioning to segregate write-protected blocks. On the Treo680, the
277 first five erase blocks (256KiB each) are write-protected, followed
278 by the block containing the saftl partition table. This is probably
279 typical.
280
281config MTD_NAND_SHARPSL
282 tristate "Support for NAND Flash on Sharp SL Series (C7xx + others)"
283 depends on ARCH_PXA
284
285config MTD_NAND_CAFE
286 tristate "NAND support for OLPC CAFÉ chip"
287 depends on PCI
288 select REED_SOLOMON
289 select REED_SOLOMON_DEC16
290 help
291 Use NAND flash attached to the CAFÉ chip designed for the OLPC
292 laptop.
293
294config MTD_NAND_CS553X
295 tristate "NAND support for CS5535/CS5536 (AMD Geode companion chip)"
296 depends on X86_32
297 depends on !UML && HAS_IOMEM
298 help
299 The CS553x companion chips for the AMD Geode processor
300 include NAND flash controllers with built-in hardware ECC
301 capabilities; enabling this option will allow you to use
302 these. The driver will check the MSRs to verify that the
303 controller is enabled for NAND, and currently requires that
304 the controller be in MMIO mode.
305
306 If you say "m", the module will be called cs553x_nand.
307
308config MTD_NAND_ATMEL
309 tristate "Support for NAND Flash / SmartMedia on AT91"
310 depends on ARCH_AT91
311 select MFD_ATMEL_SMC
312 help
313 Enables support for NAND Flash / Smart Media Card interface
314 on Atmel AT91 processors.
315
316config MTD_NAND_PXA3xx
317 tristate "NAND support on PXA3xx and Armada 370/XP"
318 depends on !MTD_NAND_MARVELL
319 depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU
320 help
321
322 This enables the driver for the NAND flash device found on
323 PXA3xx processors (NFCv1) and also on 32-bit Armada
324 platforms (XP, 370, 375, 38x, 39x) and 64-bit Armada
325 platforms (7K, 8K) (NFCv2).
326
327config MTD_NAND_MARVELL
328 tristate "NAND controller support on Marvell boards"
329 depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU || \
330 COMPILE_TEST
331 depends on HAS_IOMEM
332 help
333 This enables the NAND flash controller driver for Marvell boards,
334 including:
335 - PXA3xx processors (NFCv1)
336 - 32-bit Armada platforms (XP, 37x, 38x, 39x) (NFCv2)
337 - 64-bit Aramda platforms (7k, 8k) (NFCv2)
338
339config MTD_NAND_SLC_LPC32XX
340 tristate "NXP LPC32xx SLC Controller"
341 depends on ARCH_LPC32XX
342 help
343 Enables support for NXP's LPC32XX SLC (i.e. for Single Level Cell
344 chips) NAND controller. This is the default for the PHYTEC 3250
345 reference board which contains a NAND256R3A2CZA6 chip.
346
347 Please check the actual NAND chip connected and its support
348 by the SLC NAND controller.
349
350config MTD_NAND_MLC_LPC32XX
351 tristate "NXP LPC32xx MLC Controller"
352 depends on ARCH_LPC32XX
353 help
354 Uses the LPC32XX MLC (i.e. for Multi Level Cell chips) NAND
355 controller. This is the default for the WORK92105 controller
356 board.
357
358 Please check the actual NAND chip connected and its support
359 by the MLC NAND controller.
360
361config MTD_NAND_CM_X270
362 tristate "Support for NAND Flash on CM-X270 modules"
363 depends on MACH_ARMCORE
364
365config MTD_NAND_PASEMI
366 tristate "NAND support for PA Semi PWRficient"
367 depends on PPC_PASEMI
368 help
369 Enables support for NAND Flash interface on PA Semi PWRficient
370 based boards
371
372config MTD_NAND_TMIO
373 tristate "NAND Flash device on Toshiba Mobile IO Controller"
374 depends on MFD_TMIO
375 help
376 Support for NAND flash connected to a Toshiba Mobile IO
377 Controller in some PDAs, including the Sharp SL6000x.
378
379config MTD_NAND_NANDSIM
380 tristate "Support for NAND Flash Simulator"
381 help
382 The simulator may simulate various NAND flash chips for the
383 MTD nand layer.
384
385config MTD_NAND_GPMI_NAND
386 tristate "GPMI NAND Flash Controller driver"
387 depends on MTD_NAND && MXS_DMA
388 help
389 Enables NAND Flash support for IMX23, IMX28 or IMX6.
390 The GPMI controller is very powerful, with the help of BCH
391 module, it can do the hardware ECC. The GPMI supports several
392 NAND flashs at the same time.
393
394config MTD_NAND_BRCMNAND
395 tristate "Broadcom STB NAND controller"
396 depends on ARM || ARM64 || MIPS
397 help
398 Enables the Broadcom NAND controller driver. The controller was
399 originally designed for Set-Top Box but is used on various BCM7xxx,
400 BCM3xxx, BCM63xxx, iProc/Cygnus and more.
401
402config MTD_NAND_BCM47XXNFLASH
403 tristate "Support for NAND flash on BCM4706 BCMA bus"
404 depends on BCMA_NFLASH
405 help
406 BCMA bus can have various flash memories attached, they are
407 registered by bcma as platform devices. This enables driver for
408 NAND flash memories. For now only BCM4706 is supported.
409
410config MTD_NAND_PLATFORM
411 tristate "Support for generic platform NAND driver"
412 depends on HAS_IOMEM
413 help
414 This implements a generic NAND driver for on-SOC platform
415 devices. You will need to provide platform-specific functions
416 via platform_data.
417
418config MTD_NAND_ORION
419 tristate "NAND Flash support for Marvell Orion SoC"
420 depends on PLAT_ORION
421 help
422 This enables the NAND flash controller on Orion machines.
423
424 No board specific support is done by this driver, each board
425 must advertise a platform_device for the driver to attach.
426
427config MTD_NAND_OXNAS
428 tristate "NAND Flash support for Oxford Semiconductor SoC"
429 depends on ARCH_OXNAS || COMPILE_TEST
430 depends on HAS_IOMEM
431 help
432 This enables the NAND flash controller on Oxford Semiconductor SoCs.
433
434config MTD_NAND_FSL_ELBC
435 tristate "NAND support for Freescale eLBC controllers"
436 depends on FSL_SOC
437 select FSL_LBC
438 help
439 Various Freescale chips, including the 8313, include a NAND Flash
440 Controller Module with built-in hardware ECC capabilities.
441 Enabling this option will enable you to use this to control
442 external NAND devices.
443
444config MTD_NAND_FSL_IFC
445 tristate "NAND support for Freescale IFC controller"
446 depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A
447 select FSL_IFC
448 select MEMORY
449 help
450 Various Freescale chips e.g P1010, include a NAND Flash machine
451 with built-in hardware ECC capabilities.
452 Enabling this option will enable you to use this to control
453 external NAND devices.
454
455config MTD_NAND_FSL_UPM
456 tristate "Support for NAND on Freescale UPM"
457 depends on PPC_83xx || PPC_85xx
458 select FSL_LBC
459 help
460 Enables support for NAND Flash chips wired onto Freescale PowerPC
461 processor localbus with User-Programmable Machine support.
462
463config MTD_NAND_MPC5121_NFC
464 tristate "MPC5121 built-in NAND Flash Controller support"
465 depends on PPC_MPC512x
466 help
467 This enables the driver for the NAND flash controller on the
468 MPC5121 SoC.
469
470config MTD_NAND_VF610_NFC
471 tristate "Support for Freescale NFC for VF610/MPC5125"
472 depends on (SOC_VF610 || COMPILE_TEST)
473 depends on HAS_IOMEM
474 help
475 Enables support for NAND Flash Controller on some Freescale
476 processors like the VF610, MPC5125, MCF54418 or Kinetis K70.
477 The driver supports a maximum 2k page size. With 2k pages and
478 64 bytes or more of OOB, hardware ECC with up to 32-bit error
479 correction is supported. Hardware ECC is only enabled through
480 device tree.
481
482config MTD_NAND_MXC
483 tristate "MXC NAND support"
484 depends on ARCH_MXC
485 help
486 This enables the driver for the NAND flash controller on the
487 MXC processors.
488
489config MTD_NAND_SH_FLCTL
490 tristate "Support for NAND on Renesas SuperH FLCTL"
491 depends on SUPERH || COMPILE_TEST
492 depends on HAS_IOMEM
493 depends on HAS_DMA
494 help
495 Several Renesas SuperH CPU has FLCTL. This option enables support
496 for NAND Flash using FLCTL.
497
498config MTD_NAND_DAVINCI
499 tristate "Support NAND on DaVinci/Keystone SoC"
500 depends on ARCH_DAVINCI || (ARCH_KEYSTONE && TI_AEMIF)
501 help
502 Enable the driver for NAND flash chips on Texas Instruments
503 DaVinci/Keystone processors.
504
505config MTD_NAND_TXX9NDFMC
506 tristate "NAND Flash support for TXx9 SoC"
507 depends on SOC_TX4938 || SOC_TX4939
508 help
509 This enables the NAND flash controller on the TXx9 SoCs.
510
511config MTD_NAND_SOCRATES
512 tristate "Support for NAND on Socrates board"
513 depends on SOCRATES
514 help
515 Enables support for NAND Flash chips wired onto Socrates board.
516
517config MTD_NAND_NUC900
518 tristate "Support for NAND on Nuvoton NUC9xx/w90p910 evaluation boards."
519 depends on ARCH_W90X900
520 help
521 This enables the driver for the NAND Flash on evaluation board based
522 on w90p910 / NUC9xx.
523
524config MTD_NAND_JZ4740
525 tristate "Support for JZ4740 SoC NAND controller"
526 depends on MACH_JZ4740
527 help
528 Enables support for NAND Flash on JZ4740 SoC based boards.
529
530config MTD_NAND_JZ4780
531 tristate "Support for NAND on JZ4780 SoC"
532 depends on MACH_JZ4780 && JZ4780_NEMC
533 help
534 Enables support for NAND Flash connected to the NEMC on JZ4780 SoC
535 based boards, using the BCH controller for hardware error correction.
536
537config MTD_NAND_FSMC
538 tristate "Support for NAND on ST Micros FSMC"
539 depends on OF
540 depends on PLAT_SPEAR || ARCH_NOMADIK || ARCH_U8500 || MACH_U300
541 help
542 Enables support for NAND Flash chips on the ST Microelectronics
543 Flexible Static Memory Controller (FSMC)
544
545config MTD_NAND_XWAY
546 bool "Support for NAND on Lantiq XWAY SoC"
547 depends on LANTIQ && SOC_TYPE_XWAY
548 help
549 Enables support for NAND Flash chips on Lantiq XWAY SoCs. NAND is attached
550 to the External Bus Unit (EBU).
551
552config MTD_NAND_SUNXI
553 tristate "Support for NAND on Allwinner SoCs"
554 depends on ARCH_SUNXI
555 help
556 Enables support for NAND Flash chips on Allwinner SoCs.
557
558config MTD_NAND_HISI504
559 tristate "Support for NAND controller on Hisilicon SoC Hip04"
560 depends on ARCH_HISI || COMPILE_TEST
561 depends on HAS_DMA
562 help
563 Enables support for NAND controller on Hisilicon SoC Hip04.
564
565config MTD_NAND_QCOM
566 tristate "Support for NAND on QCOM SoCs"
567 depends on ARCH_QCOM
568 help
569 Enables support for NAND flash chips on SoCs containing the EBI2 NAND
570 controller. This controller is found on IPQ806x SoC.
571
572config MTD_NAND_MTK
573 tristate "Support for NAND controller on MTK SoCs"
574 depends on ARCH_MEDIATEK || COMPILE_TEST
575 depends on HAS_DMA
576 help
577 Enables support for NAND controller on MTK SoCs.
578 This controller is found on mt27xx, mt81xx, mt65xx SoCs.
579
580endif # MTD_NAND
diff --git a/drivers/mtd/nand/raw/Makefile b/drivers/mtd/nand/raw/Makefile
new file mode 100644
index 000000000000..4e0982476267
--- /dev/null
+++ b/drivers/mtd/nand/raw/Makefile
@@ -0,0 +1,68 @@
1# SPDX-License-Identifier: GPL-2.0
2
3obj-$(CONFIG_MTD_NAND) += nand.o
4obj-$(CONFIG_MTD_NAND_ECC) += nand_ecc.o
5obj-$(CONFIG_MTD_NAND_BCH) += nand_bch.o
6obj-$(CONFIG_MTD_SM_COMMON) += sm_common.o
7
8obj-$(CONFIG_MTD_NAND_CAFE) += cafe_nand.o
9obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o
10obj-$(CONFIG_MTD_NAND_DENALI) += denali.o
11obj-$(CONFIG_MTD_NAND_DENALI_PCI) += denali_pci.o
12obj-$(CONFIG_MTD_NAND_DENALI_DT) += denali_dt.o
13obj-$(CONFIG_MTD_NAND_AU1550) += au1550nd.o
14obj-$(CONFIG_MTD_NAND_BF5XX) += bf5xx_nand.o
15obj-$(CONFIG_MTD_NAND_S3C2410) += s3c2410.o
16obj-$(CONFIG_MTD_NAND_TANGO) += tango_nand.o
17obj-$(CONFIG_MTD_NAND_DAVINCI) += davinci_nand.o
18obj-$(CONFIG_MTD_NAND_DISKONCHIP) += diskonchip.o
19obj-$(CONFIG_MTD_NAND_DOCG4) += docg4.o
20obj-$(CONFIG_MTD_NAND_FSMC) += fsmc_nand.o
21obj-$(CONFIG_MTD_NAND_SHARPSL) += sharpsl.o
22obj-$(CONFIG_MTD_NAND_NANDSIM) += nandsim.o
23obj-$(CONFIG_MTD_NAND_CS553X) += cs553x_nand.o
24obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o
25obj-$(CONFIG_MTD_NAND_ATMEL) += atmel/
26obj-$(CONFIG_MTD_NAND_GPIO) += gpio.o
27omap2_nand-objs := omap2.o
28obj-$(CONFIG_MTD_NAND_OMAP2) += omap2_nand.o
29obj-$(CONFIG_MTD_NAND_OMAP_BCH_BUILD) += omap_elm.o
30obj-$(CONFIG_MTD_NAND_CM_X270) += cmx270_nand.o
31obj-$(CONFIG_MTD_NAND_PXA3xx) += pxa3xx_nand.o
32obj-$(CONFIG_MTD_NAND_MARVELL) += marvell_nand.o
33obj-$(CONFIG_MTD_NAND_TMIO) += tmio_nand.o
34obj-$(CONFIG_MTD_NAND_PLATFORM) += plat_nand.o
35obj-$(CONFIG_MTD_NAND_PASEMI) += pasemi_nand.o
36obj-$(CONFIG_MTD_NAND_ORION) += orion_nand.o
37obj-$(CONFIG_MTD_NAND_OXNAS) += oxnas_nand.o
38obj-$(CONFIG_MTD_NAND_FSL_ELBC) += fsl_elbc_nand.o
39obj-$(CONFIG_MTD_NAND_FSL_IFC) += fsl_ifc_nand.o
40obj-$(CONFIG_MTD_NAND_FSL_UPM) += fsl_upm.o
41obj-$(CONFIG_MTD_NAND_SLC_LPC32XX) += lpc32xx_slc.o
42obj-$(CONFIG_MTD_NAND_MLC_LPC32XX) += lpc32xx_mlc.o
43obj-$(CONFIG_MTD_NAND_SH_FLCTL) += sh_flctl.o
44obj-$(CONFIG_MTD_NAND_MXC) += mxc_nand.o
45obj-$(CONFIG_MTD_NAND_SOCRATES) += socrates_nand.o
46obj-$(CONFIG_MTD_NAND_TXX9NDFMC) += txx9ndfmc.o
47obj-$(CONFIG_MTD_NAND_NUC900) += nuc900_nand.o
48obj-$(CONFIG_MTD_NAND_MPC5121_NFC) += mpc5121_nfc.o
49obj-$(CONFIG_MTD_NAND_VF610_NFC) += vf610_nfc.o
50obj-$(CONFIG_MTD_NAND_RICOH) += r852.o
51obj-$(CONFIG_MTD_NAND_JZ4740) += jz4740_nand.o
52obj-$(CONFIG_MTD_NAND_JZ4780) += jz4780_nand.o jz4780_bch.o
53obj-$(CONFIG_MTD_NAND_GPMI_NAND) += gpmi-nand/
54obj-$(CONFIG_MTD_NAND_XWAY) += xway_nand.o
55obj-$(CONFIG_MTD_NAND_BCM47XXNFLASH) += bcm47xxnflash/
56obj-$(CONFIG_MTD_NAND_SUNXI) += sunxi_nand.o
57obj-$(CONFIG_MTD_NAND_HISI504) += hisi504_nand.o
58obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmnand/
59obj-$(CONFIG_MTD_NAND_QCOM) += qcom_nandc.o
60obj-$(CONFIG_MTD_NAND_MTK) += mtk_ecc.o mtk_nand.o
61
62nand-objs := nand_base.o nand_bbt.o nand_timings.o nand_ids.o
63nand-objs += nand_amd.o
64nand-objs += nand_hynix.o
65nand-objs += nand_macronix.o
66nand-objs += nand_micron.o
67nand-objs += nand_samsung.o
68nand-objs += nand_toshiba.o
diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/raw/ams-delta.c
index 35f80523e52e..35f80523e52e 100644
--- a/drivers/mtd/nand/ams-delta.c
+++ b/drivers/mtd/nand/raw/ams-delta.c
diff --git a/drivers/mtd/nand/atmel/Makefile b/drivers/mtd/nand/raw/atmel/Makefile
index 288db4f38a8f..288db4f38a8f 100644
--- a/drivers/mtd/nand/atmel/Makefile
+++ b/drivers/mtd/nand/raw/atmel/Makefile
diff --git a/drivers/mtd/nand/atmel/nand-controller.c b/drivers/mtd/nand/raw/atmel/nand-controller.c
index 12f6753d47ae..12f6753d47ae 100644
--- a/drivers/mtd/nand/atmel/nand-controller.c
+++ b/drivers/mtd/nand/raw/atmel/nand-controller.c
diff --git a/drivers/mtd/nand/atmel/pmecc.c b/drivers/mtd/nand/raw/atmel/pmecc.c
index 9de29c9afb0c..9de29c9afb0c 100644
--- a/drivers/mtd/nand/atmel/pmecc.c
+++ b/drivers/mtd/nand/raw/atmel/pmecc.c
diff --git a/drivers/mtd/nand/atmel/pmecc.h b/drivers/mtd/nand/raw/atmel/pmecc.h
index 808f1be0d6ad..808f1be0d6ad 100644
--- a/drivers/mtd/nand/atmel/pmecc.h
+++ b/drivers/mtd/nand/raw/atmel/pmecc.h
diff --git a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/raw/au1550nd.c
index df0ef1f1e2f5..df0ef1f1e2f5 100644
--- a/drivers/mtd/nand/au1550nd.c
+++ b/drivers/mtd/nand/raw/au1550nd.c
diff --git a/drivers/mtd/nand/bcm47xxnflash/Makefile b/drivers/mtd/nand/raw/bcm47xxnflash/Makefile
index f05b119e134b..f05b119e134b 100644
--- a/drivers/mtd/nand/bcm47xxnflash/Makefile
+++ b/drivers/mtd/nand/raw/bcm47xxnflash/Makefile
diff --git a/drivers/mtd/nand/bcm47xxnflash/bcm47xxnflash.h b/drivers/mtd/nand/raw/bcm47xxnflash/bcm47xxnflash.h
index 201b9baa52a0..201b9baa52a0 100644
--- a/drivers/mtd/nand/bcm47xxnflash/bcm47xxnflash.h
+++ b/drivers/mtd/nand/raw/bcm47xxnflash/bcm47xxnflash.h
diff --git a/drivers/mtd/nand/bcm47xxnflash/main.c b/drivers/mtd/nand/raw/bcm47xxnflash/main.c
index fb31429b70a9..fb31429b70a9 100644
--- a/drivers/mtd/nand/bcm47xxnflash/main.c
+++ b/drivers/mtd/nand/raw/bcm47xxnflash/main.c
diff --git a/drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c b/drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.c
index 54bac5b73f0a..54bac5b73f0a 100644
--- a/drivers/mtd/nand/bcm47xxnflash/ops_bcm4706.c
+++ b/drivers/mtd/nand/raw/bcm47xxnflash/ops_bcm4706.c
diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/raw/bf5xx_nand.c
index 9a1d8d104570..9a1d8d104570 100644
--- a/drivers/mtd/nand/bf5xx_nand.c
+++ b/drivers/mtd/nand/raw/bf5xx_nand.c
diff --git a/drivers/mtd/nand/brcmnand/Makefile b/drivers/mtd/nand/raw/brcmnand/Makefile
index 195b845e48b8..195b845e48b8 100644
--- a/drivers/mtd/nand/brcmnand/Makefile
+++ b/drivers/mtd/nand/raw/brcmnand/Makefile
diff --git a/drivers/mtd/nand/brcmnand/bcm63138_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm63138_nand.c
index 59444b3a697d..59444b3a697d 100644
--- a/drivers/mtd/nand/brcmnand/bcm63138_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm63138_nand.c
diff --git a/drivers/mtd/nand/brcmnand/bcm6368_nand.c b/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
index 34c91b0e1e69..34c91b0e1e69 100644
--- a/drivers/mtd/nand/brcmnand/bcm6368_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/bcm6368_nand.c
diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
index c28fd2bc1a84..c28fd2bc1a84 100644
--- a/drivers/mtd/nand/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.c
diff --git a/drivers/mtd/nand/brcmnand/brcmnand.h b/drivers/mtd/nand/raw/brcmnand/brcmnand.h
index 5c44cd4aba87..5c44cd4aba87 100644
--- a/drivers/mtd/nand/brcmnand/brcmnand.h
+++ b/drivers/mtd/nand/raw/brcmnand/brcmnand.h
diff --git a/drivers/mtd/nand/brcmnand/brcmstb_nand.c b/drivers/mtd/nand/raw/brcmnand/brcmstb_nand.c
index 5c271077ac87..5c271077ac87 100644
--- a/drivers/mtd/nand/brcmnand/brcmstb_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/brcmstb_nand.c
diff --git a/drivers/mtd/nand/brcmnand/iproc_nand.c b/drivers/mtd/nand/raw/brcmnand/iproc_nand.c
index 4c6ae113664d..4c6ae113664d 100644
--- a/drivers/mtd/nand/brcmnand/iproc_nand.c
+++ b/drivers/mtd/nand/raw/brcmnand/iproc_nand.c
diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/raw/cafe_nand.c
index 567ff972d5fc..567ff972d5fc 100644
--- a/drivers/mtd/nand/cafe_nand.c
+++ b/drivers/mtd/nand/raw/cafe_nand.c
diff --git a/drivers/mtd/nand/cmx270_nand.c b/drivers/mtd/nand/raw/cmx270_nand.c
index 02d6751e9efe..02d6751e9efe 100644
--- a/drivers/mtd/nand/cmx270_nand.c
+++ b/drivers/mtd/nand/raw/cmx270_nand.c
diff --git a/drivers/mtd/nand/cs553x_nand.c b/drivers/mtd/nand/raw/cs553x_nand.c
index be1f28fc7363..be1f28fc7363 100644
--- a/drivers/mtd/nand/cs553x_nand.c
+++ b/drivers/mtd/nand/raw/cs553x_nand.c
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/raw/davinci_nand.c
index ccc8c43abcff..ccc8c43abcff 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/raw/davinci_nand.c
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/raw/denali.c
index 313c7f50621b..313c7f50621b 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/raw/denali.c
diff --git a/drivers/mtd/nand/denali.h b/drivers/mtd/nand/raw/denali.h
index 9ad33d237378..9ad33d237378 100644
--- a/drivers/mtd/nand/denali.h
+++ b/drivers/mtd/nand/raw/denali.h
diff --git a/drivers/mtd/nand/denali_dt.c b/drivers/mtd/nand/raw/denali_dt.c
index cfd33e6ca77f..cfd33e6ca77f 100644
--- a/drivers/mtd/nand/denali_dt.c
+++ b/drivers/mtd/nand/raw/denali_dt.c
diff --git a/drivers/mtd/nand/denali_pci.c b/drivers/mtd/nand/raw/denali_pci.c
index 49cb3e1f8bd0..49cb3e1f8bd0 100644
--- a/drivers/mtd/nand/denali_pci.c
+++ b/drivers/mtd/nand/raw/denali_pci.c
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/raw/diskonchip.c
index 1af77f798fe5..1af77f798fe5 100644
--- a/drivers/mtd/nand/diskonchip.c
+++ b/drivers/mtd/nand/raw/diskonchip.c
diff --git a/drivers/mtd/nand/docg4.c b/drivers/mtd/nand/raw/docg4.c
index 72f1327c4430..72f1327c4430 100644
--- a/drivers/mtd/nand/docg4.c
+++ b/drivers/mtd/nand/raw/docg4.c
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c
index 8b6dcd739ecb..8b6dcd739ecb 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c
diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/raw/fsl_ifc_nand.c
index 4872a7ba6503..4872a7ba6503 100644
--- a/drivers/mtd/nand/fsl_ifc_nand.c
+++ b/drivers/mtd/nand/raw/fsl_ifc_nand.c
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/raw/fsl_upm.c
index a88e2cf66e0f..a88e2cf66e0f 100644
--- a/drivers/mtd/nand/fsl_upm.c
+++ b/drivers/mtd/nand/raw/fsl_upm.c
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/raw/fsmc_nand.c
index 7e66268f8154..7e66268f8154 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/raw/fsmc_nand.c
diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/raw/gpio.c
index 2780af26d9ab..2780af26d9ab 100644
--- a/drivers/mtd/nand/gpio.c
+++ b/drivers/mtd/nand/raw/gpio.c
diff --git a/drivers/mtd/nand/gpmi-nand/Makefile b/drivers/mtd/nand/raw/gpmi-nand/Makefile
index 3a462487c35e..3a462487c35e 100644
--- a/drivers/mtd/nand/gpmi-nand/Makefile
+++ b/drivers/mtd/nand/raw/gpmi-nand/Makefile
diff --git a/drivers/mtd/nand/gpmi-nand/bch-regs.h b/drivers/mtd/nand/raw/gpmi-nand/bch-regs.h
index 05bb91f2f4c4..05bb91f2f4c4 100644
--- a/drivers/mtd/nand/gpmi-nand/bch-regs.h
+++ b/drivers/mtd/nand/raw/gpmi-nand/bch-regs.h
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c
index 97787246af41..97787246af41 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-lib.c
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
index 61fdd733492f..61fdd733492f 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-nand.h b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h
index 06c1f993912c..06c1f993912c 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-nand.h
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.h
diff --git a/drivers/mtd/nand/gpmi-nand/gpmi-regs.h b/drivers/mtd/nand/raw/gpmi-nand/gpmi-regs.h
index 82114cdc8330..82114cdc8330 100644
--- a/drivers/mtd/nand/gpmi-nand/gpmi-regs.h
+++ b/drivers/mtd/nand/raw/gpmi-nand/gpmi-regs.h
diff --git a/drivers/mtd/nand/hisi504_nand.c b/drivers/mtd/nand/raw/hisi504_nand.c
index cb862793ab6d..cb862793ab6d 100644
--- a/drivers/mtd/nand/hisi504_nand.c
+++ b/drivers/mtd/nand/raw/hisi504_nand.c
diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/raw/jz4740_nand.c
index 613b00a9604b..613b00a9604b 100644
--- a/drivers/mtd/nand/jz4740_nand.c
+++ b/drivers/mtd/nand/raw/jz4740_nand.c
diff --git a/drivers/mtd/nand/jz4780_bch.c b/drivers/mtd/nand/raw/jz4780_bch.c
index 731c6051d91e..731c6051d91e 100644
--- a/drivers/mtd/nand/jz4780_bch.c
+++ b/drivers/mtd/nand/raw/jz4780_bch.c
diff --git a/drivers/mtd/nand/jz4780_bch.h b/drivers/mtd/nand/raw/jz4780_bch.h
index bf4718088a3a..bf4718088a3a 100644
--- a/drivers/mtd/nand/jz4780_bch.h
+++ b/drivers/mtd/nand/raw/jz4780_bch.h
diff --git a/drivers/mtd/nand/jz4780_nand.c b/drivers/mtd/nand/raw/jz4780_nand.c
index e69f6ae4c539..e69f6ae4c539 100644
--- a/drivers/mtd/nand/jz4780_nand.c
+++ b/drivers/mtd/nand/raw/jz4780_nand.c
diff --git a/drivers/mtd/nand/lpc32xx_mlc.c b/drivers/mtd/nand/raw/lpc32xx_mlc.c
index e357948a7505..e357948a7505 100644
--- a/drivers/mtd/nand/lpc32xx_mlc.c
+++ b/drivers/mtd/nand/raw/lpc32xx_mlc.c
diff --git a/drivers/mtd/nand/lpc32xx_slc.c b/drivers/mtd/nand/raw/lpc32xx_slc.c
index 5f7cc6da0a7f..5f7cc6da0a7f 100644
--- a/drivers/mtd/nand/lpc32xx_slc.c
+++ b/drivers/mtd/nand/raw/lpc32xx_slc.c
diff --git a/drivers/mtd/nand/marvell_nand.c b/drivers/mtd/nand/raw/marvell_nand.c
index cc21f9633edd..cc21f9633edd 100644
--- a/drivers/mtd/nand/marvell_nand.c
+++ b/drivers/mtd/nand/raw/marvell_nand.c
diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/raw/mpc5121_nfc.c
index 913b9d1225c6..913b9d1225c6 100644
--- a/drivers/mtd/nand/mpc5121_nfc.c
+++ b/drivers/mtd/nand/raw/mpc5121_nfc.c
diff --git a/drivers/mtd/nand/mtk_ecc.c b/drivers/mtd/nand/raw/mtk_ecc.c
index 40d86a861a70..40d86a861a70 100644
--- a/drivers/mtd/nand/mtk_ecc.c
+++ b/drivers/mtd/nand/raw/mtk_ecc.c
diff --git a/drivers/mtd/nand/mtk_ecc.h b/drivers/mtd/nand/raw/mtk_ecc.h
index a455df080952..a455df080952 100644
--- a/drivers/mtd/nand/mtk_ecc.h
+++ b/drivers/mtd/nand/raw/mtk_ecc.h
diff --git a/drivers/mtd/nand/mtk_nand.c b/drivers/mtd/nand/raw/mtk_nand.c
index 6977da3a26aa..6977da3a26aa 100644
--- a/drivers/mtd/nand/mtk_nand.c
+++ b/drivers/mtd/nand/raw/mtk_nand.c
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/raw/mxc_nand.c
index 87b5ee66e501..87b5ee66e501 100644
--- a/drivers/mtd/nand/mxc_nand.c
+++ b/drivers/mtd/nand/raw/mxc_nand.c
diff --git a/drivers/mtd/nand/nand_amd.c b/drivers/mtd/nand/raw/nand_amd.c
index 22f060f38123..22f060f38123 100644
--- a/drivers/mtd/nand/nand_amd.c
+++ b/drivers/mtd/nand/raw/nand_amd.c
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/raw/nand_base.c
index e70ca16a5118..e70ca16a5118 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/raw/nand_base.c
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/raw/nand_bbt.c
index 36092850be2c..36092850be2c 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/raw/nand_bbt.c
diff --git a/drivers/mtd/nand/nand_bch.c b/drivers/mtd/nand/raw/nand_bch.c
index 505441c9373b..505441c9373b 100644
--- a/drivers/mtd/nand/nand_bch.c
+++ b/drivers/mtd/nand/raw/nand_bch.c
diff --git a/drivers/mtd/nand/nand_ecc.c b/drivers/mtd/nand/raw/nand_ecc.c
index 3630f0fe8fa4..3630f0fe8fa4 100644
--- a/drivers/mtd/nand/nand_ecc.c
+++ b/drivers/mtd/nand/raw/nand_ecc.c
diff --git a/drivers/mtd/nand/nand_hynix.c b/drivers/mtd/nand/raw/nand_hynix.c
index d542908a0ebb..d542908a0ebb 100644
--- a/drivers/mtd/nand/nand_hynix.c
+++ b/drivers/mtd/nand/raw/nand_hynix.c
diff --git a/drivers/mtd/nand/nand_ids.c b/drivers/mtd/nand/raw/nand_ids.c
index 5423c3bb388e..5423c3bb388e 100644
--- a/drivers/mtd/nand/nand_ids.c
+++ b/drivers/mtd/nand/raw/nand_ids.c
diff --git a/drivers/mtd/nand/nand_macronix.c b/drivers/mtd/nand/raw/nand_macronix.c
index d290ff2a6d2f..d290ff2a6d2f 100644
--- a/drivers/mtd/nand/nand_macronix.c
+++ b/drivers/mtd/nand/raw/nand_macronix.c
diff --git a/drivers/mtd/nand/nand_micron.c b/drivers/mtd/nand/raw/nand_micron.c
index 02e109ae73f1..02e109ae73f1 100644
--- a/drivers/mtd/nand/nand_micron.c
+++ b/drivers/mtd/nand/raw/nand_micron.c
diff --git a/drivers/mtd/nand/nand_samsung.c b/drivers/mtd/nand/raw/nand_samsung.c
index ef022f62f74c..ef022f62f74c 100644
--- a/drivers/mtd/nand/nand_samsung.c
+++ b/drivers/mtd/nand/raw/nand_samsung.c
diff --git a/drivers/mtd/nand/nand_timings.c b/drivers/mtd/nand/raw/nand_timings.c
index 9400d039ddbd..9400d039ddbd 100644
--- a/drivers/mtd/nand/nand_timings.c
+++ b/drivers/mtd/nand/raw/nand_timings.c
diff --git a/drivers/mtd/nand/nand_toshiba.c b/drivers/mtd/nand/raw/nand_toshiba.c
index ab43f027cd23..ab43f027cd23 100644
--- a/drivers/mtd/nand/nand_toshiba.c
+++ b/drivers/mtd/nand/raw/nand_toshiba.c
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/raw/nandsim.c
index 44322a363ba5..44322a363ba5 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/raw/nandsim.c
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/raw/ndfc.c
index d8a806894937..d8a806894937 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/raw/ndfc.c
diff --git a/drivers/mtd/nand/nuc900_nand.c b/drivers/mtd/nand/raw/nuc900_nand.c
index af5b32c9a791..af5b32c9a791 100644
--- a/drivers/mtd/nand/nuc900_nand.c
+++ b/drivers/mtd/nand/raw/nuc900_nand.c
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/raw/omap2.c
index 8cdf7d3d8fa7..8cdf7d3d8fa7 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/raw/omap2.c
diff --git a/drivers/mtd/nand/omap_elm.c b/drivers/mtd/nand/raw/omap_elm.c
index a3f32f939cc1..a3f32f939cc1 100644
--- a/drivers/mtd/nand/omap_elm.c
+++ b/drivers/mtd/nand/raw/omap_elm.c
diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/raw/orion_nand.c
index 7825fd3ce66b..7825fd3ce66b 100644
--- a/drivers/mtd/nand/orion_nand.c
+++ b/drivers/mtd/nand/raw/orion_nand.c
diff --git a/drivers/mtd/nand/oxnas_nand.c b/drivers/mtd/nand/raw/oxnas_nand.c
index d649d5944826..d649d5944826 100644
--- a/drivers/mtd/nand/oxnas_nand.c
+++ b/drivers/mtd/nand/raw/oxnas_nand.c
diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/raw/pasemi_nand.c
index a47a7e4bd25a..a47a7e4bd25a 100644
--- a/drivers/mtd/nand/pasemi_nand.c
+++ b/drivers/mtd/nand/raw/pasemi_nand.c
diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/raw/plat_nand.c
index 925a1323604d..925a1323604d 100644
--- a/drivers/mtd/nand/plat_nand.c
+++ b/drivers/mtd/nand/raw/plat_nand.c
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/raw/pxa3xx_nand.c
index d75f30263d21..d75f30263d21 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/raw/pxa3xx_nand.c
diff --git a/drivers/mtd/nand/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
index 563b759ffca6..563b759ffca6 100644
--- a/drivers/mtd/nand/qcom_nandc.c
+++ b/drivers/mtd/nand/raw/qcom_nandc.c
diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/raw/r852.c
index 595635b9e9de..595635b9e9de 100644
--- a/drivers/mtd/nand/r852.c
+++ b/drivers/mtd/nand/raw/r852.c
diff --git a/drivers/mtd/nand/r852.h b/drivers/mtd/nand/raw/r852.h
index 8713c57f6207..8713c57f6207 100644
--- a/drivers/mtd/nand/r852.h
+++ b/drivers/mtd/nand/raw/r852.h
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/raw/s3c2410.c
index b5bc5f106c09..b5bc5f106c09 100644
--- a/drivers/mtd/nand/s3c2410.c
+++ b/drivers/mtd/nand/raw/s3c2410.c
diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/raw/sh_flctl.c
index c4e7755448e6..c4e7755448e6 100644
--- a/drivers/mtd/nand/sh_flctl.c
+++ b/drivers/mtd/nand/raw/sh_flctl.c
diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/raw/sharpsl.c
index e93df02c825e..e93df02c825e 100644
--- a/drivers/mtd/nand/sharpsl.c
+++ b/drivers/mtd/nand/raw/sharpsl.c
diff --git a/drivers/mtd/nand/sm_common.c b/drivers/mtd/nand/raw/sm_common.c
index c378705c6e2b..c378705c6e2b 100644
--- a/drivers/mtd/nand/sm_common.c
+++ b/drivers/mtd/nand/raw/sm_common.c
diff --git a/drivers/mtd/nand/sm_common.h b/drivers/mtd/nand/raw/sm_common.h
index 1581671b05ae..1581671b05ae 100644
--- a/drivers/mtd/nand/sm_common.h
+++ b/drivers/mtd/nand/raw/sm_common.h
diff --git a/drivers/mtd/nand/socrates_nand.c b/drivers/mtd/nand/raw/socrates_nand.c
index 9824a9923583..9824a9923583 100644
--- a/drivers/mtd/nand/socrates_nand.c
+++ b/drivers/mtd/nand/raw/socrates_nand.c
diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index f5a55c63935c..f5a55c63935c 100644
--- a/drivers/mtd/nand/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
diff --git a/drivers/mtd/nand/tango_nand.c b/drivers/mtd/nand/raw/tango_nand.c
index c5bee00b7f5e..c5bee00b7f5e 100644
--- a/drivers/mtd/nand/tango_nand.c
+++ b/drivers/mtd/nand/raw/tango_nand.c
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/raw/tmio_nand.c
index dcaa924502de..dcaa924502de 100644
--- a/drivers/mtd/nand/tmio_nand.c
+++ b/drivers/mtd/nand/raw/tmio_nand.c
diff --git a/drivers/mtd/nand/txx9ndfmc.c b/drivers/mtd/nand/raw/txx9ndfmc.c
index b567d212fe7d..b567d212fe7d 100644
--- a/drivers/mtd/nand/txx9ndfmc.c
+++ b/drivers/mtd/nand/raw/txx9ndfmc.c
diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/raw/vf610_nfc.c
index 5d7a1f8f580f..5d7a1f8f580f 100644
--- a/drivers/mtd/nand/vf610_nfc.c
+++ b/drivers/mtd/nand/raw/vf610_nfc.c
diff --git a/drivers/mtd/nand/xway_nand.c b/drivers/mtd/nand/raw/xway_nand.c
index 9926b4e3d69d..9926b4e3d69d 100644
--- a/drivers/mtd/nand/xway_nand.c
+++ b/drivers/mtd/nand/raw/xway_nand.c
diff --git a/drivers/mtd/sm_ftl.c b/drivers/mtd/sm_ftl.c
index 4237c7cebf02..fa176f5937bb 100644
--- a/drivers/mtd/sm_ftl.c
+++ b/drivers/mtd/sm_ftl.c
@@ -17,7 +17,7 @@
17#include <linux/bitops.h> 17#include <linux/bitops.h>
18#include <linux/slab.h> 18#include <linux/slab.h>
19#include <linux/mtd/nand_ecc.h> 19#include <linux/mtd/nand_ecc.h>
20#include "nand/sm_common.h" 20#include "nand/raw/sm_common.h"
21#include "sm_ftl.h" 21#include "sm_ftl.h"
22 22
23 23