Commit 1ac03d4a authored by Oleg Dzhimiev's avatar Oleg Dzhimiev
Browse files

updated nand driver from linux-xlnx 4.14 to 4.19

parent 88aecd2b
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -296,24 +296,24 @@
			reg = <0xf8001000 0x1000>;
		} ;

		ps7_smcc_0: ps7-smcc@e000e000 {
			#address-cells = <1>;
		smcc: memory-controller@e000e000 {
			#address-cells = <2>;
			#size-cells = <1>;
		  	clock-names = "memclk", "aclk";
		  	clock-names = "memclk", "apb_pclk";
			clocks = <&clkc 11>, <&clkc 44>;
			compatible = "arm,pl353-smc-r2p1";
			compatible = "arm,pl353-smc-r2p1", "arm,primecell";
			interrupt-parent = <&ps7_scugic_0>;
			interrupts = < 0 18 4 >;
			ranges ;
			ranges = <0x0 0x0 0xe1000000 0x1000000 //Nand CS Region
				  0x1 0x0 0xe2000000 0x2000000 //SRAM/NOR CS Region
				  0x2 0x0 0xe4000000 0x2000000>; //SRAM/NOR CS Region

			reg = <0xe000e000 0x1000>;
			arm,addr25 = <0x0>;
			arm,nor-chip-sel0 = <0x0>;
			arm,nor-chip-sel1 = <0x0>;
			arm,sram-chip-sel0 = <0x0>;
			arm,sram-chip-sel1 = <0x0>;
			ps7_nand_0: ps7-nand@e1000000 {
			nand0: flash@e1000000 {
				compatible = "arm,pl353-nand-r2p1";
				reg = < 0xe1000000 0x1000000 >;
				reg = <0 0 0x1000000>;
                                nand-ecc-mode = "on-die";
                                nand-ecc-step-size = <2048>;
				/*arm,nand-clk-freq-hz = <0x5f5e100>;*/
				arm,nand-width = <0x8>;
				arm,nand-cycle-t0 = <0x4>;
+26 −34
Original line number Diff line number Diff line
@@ -119,21 +119,12 @@
			};
		};

		ps7_smcc_0: ps7-smcc@e000e000 {
			ps7_nand_0: ps7-nand@e1000000 {
				compatible = "arm,pl353-nand-r2p1";
				reg = < 0xe1000000 0x1000000 >;
				/*arm,nand-clk-freq-hz = <0x5f5e100>;*/
				arm,nand-width = <0x8>;
				arm,nand-cycle-t0 = <0x4>;
				arm,nand-cycle-t1 = <0x4>;
				arm,nand-cycle-t2 = <0x1>;
				arm,nand-cycle-t3 = <0x2>;
				arm,nand-cycle-t4 = <0x2>;
				arm,nand-cycle-t5 = <0x2>;
				arm,nand-cycle-t6 = <0x4>;
				#address-cells = <0x1>;
				#size-cells = <0x1>;
		smcc: memory-controller@e000e000 {
			nand0: flash@e1000000 {
				partitions {
					compatible = "fixed-partitions";
					#address-cells = <1>;
					#size-cells = <1>;
					partition@0 {
						label = "u-boot-spl";
						reg = <0x0 0x100000>;/*1MB for backup spl image(s)*/
@@ -156,6 +147,7 @@
					};
				};
			} ;
		} ;

		elphel_ahci: elphel-ahci@80000000 {
			compatible = "elphel,elphel-ahci";

src/drivers/mtd/nand/pl35x_nand.c

deleted100644 → 0
+0 −1419

File deleted.

Preview size limit exceeded, changes collapsed.

+80 −84
Original line number Diff line number Diff line
@@ -11,12 +11,12 @@ config MTD_NAND_ECC_SMC


menuconfig MTD_NAND
	tristate "NAND Device Support"
	tristate "Raw/Parallel NAND Device Support"
	depends on MTD
	select MTD_NAND_ECC
	help
	  This enables support for accessing all type of NAND flash
	  devices. For further information see
	  This enables support for accessing all type of raw/parallel
	  NAND flash devices. For further information see
	  <http://www.linux-mtd.infradead.org/doc/nand.html>.

if MTD_NAND
@@ -46,7 +46,7 @@ config MTD_NAND_DENALI
config MTD_NAND_DENALI_PCI
	tristate "Support Denali NAND controller on Intel Moorestown"
	select MTD_NAND_DENALI
	depends on HAS_DMA && PCI
	depends on PCI
	help
	  Enable the driver for NAND flash on Intel Moorestown, using the
	  Denali NAND controller core.
@@ -77,7 +77,8 @@ config MTD_NAND_AMS_DELTA

config MTD_NAND_OMAP2
	tristate "NAND Flash device on OMAP2, OMAP3, OMAP4 and Keystone"
	depends on (ARCH_OMAP2PLUS || ARCH_KEYSTONE)
	depends on ARCH_OMAP2PLUS || ARCH_KEYSTONE || COMPILE_TEST
	depends on HAS_IOMEM
	help
	  Support for NAND flash on Texas Instruments OMAP2, OMAP3, OMAP4
	  and Keystone platforms.
@@ -116,38 +117,6 @@ config MTD_NAND_AU1550
	  This enables the driver for the NAND flash controller on the
	  AMD/Alchemy 1550 SOC.

config MTD_NAND_BF5XX
	tristate "Blackfin on-chip NAND Flash Controller driver"
	depends on BF54x || BF52x
	help
	  This enables the Blackfin on-chip NAND flash controller

	  No board specific support is done by this driver, each board
	  must advertise a platform_device for the driver to attach.

	  This driver can also be built as a module. If so, the module
	  will be called bf5xx-nand.

config MTD_NAND_BF5XX_HWECC
	bool "BF5XX NAND Hardware ECC"
	default y
	depends on MTD_NAND_BF5XX
	help
	  Enable the use of the BF5XX's internal ECC generator when
	  using NAND.

config MTD_NAND_BF5XX_BOOTROM_ECC
	bool "Use Blackfin BootROM ECC Layout"
	default n
	depends on MTD_NAND_BF5XX_HWECC
	help
	  If you wish to modify NAND pages and allow the Blackfin on-chip
	  BootROM to boot from them, say Y here.  This is only necessary
	  if you are booting U-Boot out of NAND and you wish to update
	  U-Boot from Linux' userspace.  Otherwise, you should say N here.

	  If unsure, say N.

config MTD_NAND_S3C2410
	tristate "NAND Flash support for Samsung S3C SoCs"
	depends on ARCH_S3C24XX || ARCH_S3C64XX
@@ -184,7 +153,7 @@ config MTD_NAND_S3C2410_CLKSTOP
config MTD_NAND_TANGO
	tristate "NAND Flash support for Tango chips"
	depends on ARCH_TANGO || COMPILE_TEST
	depends on HAS_DMA
	depends on HAS_IOMEM
	help
	  Enables the NAND Flash controller on Tango chips.

@@ -213,7 +182,7 @@ config MTD_NAND_DISKONCHIP_PROBE_ADDRESS
	hex "Physical address of DiskOnChip" if MTD_NAND_DISKONCHIP_PROBE_ADVANCED
	depends on MTD_NAND_DISKONCHIP
	default "0"
        ---help---
	help
	  By default, the probe for DiskOnChip devices will look for a
	  DiskOnChip at every multiple of 0x2000 between 0xC8000 and 0xEE000.
	  This option allows you to specify a single address at which to probe
@@ -280,7 +249,8 @@ config MTD_NAND_DOCG4

config MTD_NAND_SHARPSL
	tristate "Support for NAND Flash on Sharp SL Series (C7xx + others)"
	depends on ARCH_PXA
	depends on ARCH_PXA || COMPILE_TEST
	depends on HAS_IOMEM

config MTD_NAND_CAFE
	tristate "NAND support for OLPC CAFÉ chip"
@@ -307,22 +277,30 @@ config MTD_NAND_CS553X

config MTD_NAND_ATMEL
	tristate "Support for NAND Flash / SmartMedia on AT91"
	depends on ARCH_AT91
	depends on ARCH_AT91 || COMPILE_TEST
	depends on HAS_IOMEM
	select GENERIC_ALLOCATOR
	select MFD_ATMEL_SMC
	help
	  Enables support for NAND Flash / Smart Media Card interface
	  on Atmel AT91 processors.

config MTD_NAND_PXA3xx
	tristate "NAND support on PXA3xx and Armada 370/XP"
	depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU
config MTD_NAND_MARVELL
	tristate "NAND controller support on Marvell boards"
	depends on PXA3xx || ARCH_MMP || PLAT_ORION || ARCH_MVEBU || \
		   COMPILE_TEST
	depends on HAS_IOMEM
	help
	  This enables the driver for the NAND flash device found on
	  PXA3xx processors (NFCv1) and also on Armada 370/XP (NFCv2).
	  This enables the NAND flash controller driver for Marvell boards,
	  including:
	  - PXA3xx processors (NFCv1)
	  - 32-bit Armada platforms (XP, 37x, 38x, 39x) (NFCv2)
	  - 64-bit Aramda platforms (7k, 8k) (NFCv2)

config MTD_NAND_SLC_LPC32XX
	tristate "NXP LPC32xx SLC Controller"
	depends on ARCH_LPC32XX
	depends on ARCH_LPC32XX || COMPILE_TEST
	depends on HAS_IOMEM
	help
	  Enables support for NXP's LPC32XX SLC (i.e. for Single Level Cell
	  chips) NAND controller. This is the default for the PHYTEC 3250
@@ -333,7 +311,8 @@ config MTD_NAND_SLC_LPC32XX

config MTD_NAND_MLC_LPC32XX
	tristate "NXP LPC32xx MLC Controller"
	depends on ARCH_LPC32XX
	depends on ARCH_LPC32XX || COMPILE_TEST
	depends on HAS_IOMEM
	help
	  Uses the LPC32XX MLC (i.e. for Multi Level Cell chips) NAND
	  controller. This is the default for the WORK92105 controller
@@ -368,18 +347,17 @@ config MTD_NAND_NANDSIM

config MTD_NAND_GPMI_NAND
	tristate "GPMI NAND Flash Controller driver"
        depends on MTD_NAND && MXS_DMA
	depends on MXS_DMA
	help
	  Enables NAND Flash support for IMX23, IMX28 or IMX6.
	  The GPMI controller is very powerful, with the help of BCH
	  module, it can do the hardware ECC. The GPMI supports several
	 NAND flashs at the same time. The GPMI may conflicts with other
	 block, such as SD card. So pay attention to it when you enable
	 the GPMI.
	  NAND flashs at the same time.

config MTD_NAND_BRCMNAND
	tristate "Broadcom STB NAND controller"
	depends on ARM || ARM64 || MIPS
	depends on ARM || ARM64 || MIPS || COMPILE_TEST
	depends on HAS_IOMEM
	help
	  Enables the Broadcom NAND controller driver. The controller was
	  originally designed for Set-Top Box but is used on various BCM7xxx,
@@ -388,6 +366,7 @@ config MTD_NAND_BRCMNAND
config MTD_NAND_BCM47XXNFLASH
	tristate "Support for NAND flash on BCM4706 BCMA bus"
	depends on BCMA_NFLASH
	depends on BCMA
	help
	  BCMA bus can have various flash memories attached, they are
	  registered by bcma as platform devices. This enables driver for
@@ -429,7 +408,8 @@ config MTD_NAND_FSL_ELBC

config MTD_NAND_FSL_IFC
	tristate "NAND support for Freescale IFC controller"
	depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A
	depends on FSL_SOC || ARCH_LAYERSCAPE || SOC_LS1021A || COMPILE_TEST
	depends on HAS_IOMEM
	select FSL_IFC
	select MEMORY
	help
@@ -467,7 +447,8 @@ config MTD_NAND_VF610_NFC

config MTD_NAND_MXC
	tristate "MXC NAND support"
	depends on ARCH_MXC
	depends on ARCH_MXC || COMPILE_TEST
	depends on HAS_IOMEM
	help
	  This enables the driver for the NAND flash controller on the
	  MXC processors.
@@ -476,21 +457,22 @@ config MTD_NAND_SH_FLCTL
	tristate "Support for NAND on Renesas SuperH FLCTL"
	depends on SUPERH || COMPILE_TEST
	depends on HAS_IOMEM
	depends on HAS_DMA
	help
	  Several Renesas SuperH CPU has FLCTL. This option enables support
	  for NAND Flash using FLCTL.

config MTD_NAND_DAVINCI
	tristate "Support NAND on DaVinci/Keystone SoC"
        depends on ARCH_DAVINCI || (ARCH_KEYSTONE && TI_AEMIF)
	depends on ARCH_DAVINCI || (ARCH_KEYSTONE && TI_AEMIF) || COMPILE_TEST
	depends on HAS_IOMEM
	help
	  Enable the driver for NAND flash chips on Texas Instruments
	  DaVinci/Keystone processors.

config MTD_NAND_TXX9NDFMC
	tristate "NAND Flash support for TXx9 SoC"
	depends on SOC_TX4938 || SOC_TX4939
	depends on SOC_TX4938 || SOC_TX4939 || COMPILE_TEST
	depends on HAS_IOMEM
	help
	  This enables the NAND flash controller on the TXx9 SoCs.

@@ -502,36 +484,31 @@ config MTD_NAND_SOCRATES

config MTD_NAND_NUC900
	tristate "Support for NAND on Nuvoton NUC9xx/w90p910 evaluation boards."
	depends on ARCH_W90X900
	depends on ARCH_W90X900 || COMPILE_TEST
	depends on HAS_IOMEM
	help
	  This enables the driver for the NAND Flash on evaluation board based
	  on w90p910 / NUC9xx.

config MTD_NAND_PL35X
	tristate "ARM Pl35X NAND flash driver"
	depends on MTD_NAND && ARM
	depends on PL35X_SMC
	help
	  This enables access to the NAND flash device on PL351/PL353
	  SMC controller.

config MTD_NAND_JZ4740
	tristate "Support for JZ4740 SoC NAND controller"
	depends on MACH_JZ4740
	depends on MACH_JZ4740 || COMPILE_TEST
	depends on HAS_IOMEM
	help
	  Enables support for NAND Flash on JZ4740 SoC based boards.

config MTD_NAND_JZ4780
	tristate "Support for NAND on JZ4780 SoC"
	depends on MACH_JZ4780 && JZ4780_NEMC
	depends on JZ4780_NEMC
	help
	  Enables support for NAND Flash connected to the NEMC on JZ4780 SoC
	  based boards, using the BCH controller for hardware error correction.

config MTD_NAND_FSMC
	tristate "Support for NAND on ST Micros FSMC"
	depends on OF
	depends on PLAT_SPEAR || ARCH_NOMADIK || ARCH_U8500 || MACH_U300
	depends on OF && HAS_IOMEM
	depends on PLAT_SPEAR || ARCH_NOMADIK || ARCH_U8500 || MACH_U300 || \
		   COMPILE_TEST
	help
	  Enables support for NAND Flash chips on the ST Microelectronics
	  Flexible Static Memory Controller (FSMC)
@@ -545,28 +522,22 @@ config MTD_NAND_XWAY

config MTD_NAND_SUNXI
	tristate "Support for NAND on Allwinner SoCs"
	depends on ARCH_SUNXI
	help
	  Enables support for NAND Flash chips on Allwinner SoCs.

config MTD_NAND_ARASAN
	tristate "Support for Arasan Nand Flash controller"
	depends on ARCH_SUNXI || COMPILE_TEST
	depends on HAS_IOMEM
	depends on HAS_DMA
	help
	  Enables the driver for the Arasan Nand Flash controller on
	  Zynq Ultrascale+ MPSoC.
	  Enables support for NAND Flash chips on Allwinner SoCs.

config MTD_NAND_HISI504
	tristate "Support for NAND controller on Hisilicon SoC Hip04"
	depends on ARCH_HISI || COMPILE_TEST
	depends on HAS_DMA
	depends on HAS_IOMEM
	help
	  Enables support for NAND controller on Hisilicon SoC Hip04.

config MTD_NAND_QCOM
	tristate "Support for NAND on QCOM SoCs"
	depends on ARCH_QCOM
	depends on ARCH_QCOM || COMPILE_TEST
	depends on HAS_IOMEM
	help
	  Enables support for NAND flash chips on SoCs containing the EBI2 NAND
	  controller. This controller is found on IPQ806x SoC.
@@ -574,12 +545,37 @@ config MTD_NAND_QCOM
config MTD_NAND_MTK
	tristate "Support for NAND controller on MTK SoCs"
	depends on ARCH_MEDIATEK || COMPILE_TEST
	depends on HAS_DMA
	depends on HAS_IOMEM
	help
	  Enables support for NAND controller on MTK SoCs.
	  This controller is found on mt27xx, mt81xx, mt65xx SoCs.

# Elphel (comes from elphel393.cfg)
config MTD_NAND_TEGRA
	tristate "Support for NAND controller on NVIDIA Tegra"
	depends on ARCH_TEGRA || COMPILE_TEST
	depends on HAS_IOMEM
	help
	  Enables support for NAND flash controller on NVIDIA Tegra SoC.
	  The driver has been developed and tested on a Tegra 2 SoC. DMA
	  support, raw read/write page as well as HW ECC read/write page
	  is supported. Extra OOB bytes when using HW ECC are currently
	  not supported.

config MTD_NAND_ARASAN
	tristate "Support for Arasan Nand Flash controller"
	depends on HAS_IOMEM &&  HAS_DMA
	help
	  Enables the driver for the Arasan Nand Flash controller on
	  Zynq Ultrascale+ MPSoC.

config MTD_NAND_PL353
	tristate "ARM Pl353 NAND flash driver"
	depends on MTD_NAND && ARM
	depends on PL353_SMC
	help
	  Enables support for PrimeCell Static Memory Controller PL353.

# Elphel (enabled in elphel393.cfg)
config MTD_NAND_OTP
	tristate "NAND OTP area r/w support for Micron devices"
	default n
+7 −10
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
#
# linux/drivers/nand/Makefile
#

obj-$(CONFIG_MTD_NAND)			+= nand.o
obj-$(CONFIG_MTD_NAND_ECC)		+= nand_ecc.o
@@ -14,7 +11,6 @@ obj-$(CONFIG_MTD_NAND_DENALI) += denali.o
obj-$(CONFIG_MTD_NAND_DENALI_PCI)	+= denali_pci.o
obj-$(CONFIG_MTD_NAND_DENALI_DT)	+= denali_dt.o
obj-$(CONFIG_MTD_NAND_AU1550)		+= au1550nd.o
obj-$(CONFIG_MTD_NAND_BF5XX)		+= bf5xx_nand.o
obj-$(CONFIG_MTD_NAND_S3C2410)		+= s3c2410.o
obj-$(CONFIG_MTD_NAND_TANGO)		+= tango_nand.o
obj-$(CONFIG_MTD_NAND_DAVINCI)		+= davinci_nand.o
@@ -31,7 +27,7 @@ omap2_nand-objs := omap2.o
obj-$(CONFIG_MTD_NAND_OMAP2) 		+= omap2_nand.o
obj-$(CONFIG_MTD_NAND_OMAP_BCH_BUILD)	+= omap_elm.o
obj-$(CONFIG_MTD_NAND_CM_X270)		+= cmx270_nand.o
obj-$(CONFIG_MTD_NAND_PXA3xx)		+= pxa3xx_nand.o
obj-$(CONFIG_MTD_NAND_MARVELL)		+= marvell_nand.o
obj-$(CONFIG_MTD_NAND_TMIO)		+= tmio_nand.o
obj-$(CONFIG_MTD_NAND_PLATFORM)		+= plat_nand.o
obj-$(CONFIG_MTD_NAND_PASEMI)		+= pasemi_nand.o
@@ -56,17 +52,18 @@ obj-$(CONFIG_MTD_NAND_GPMI_NAND) += gpmi-nand/
obj-$(CONFIG_MTD_NAND_XWAY)		+= xway_nand.o
obj-$(CONFIG_MTD_NAND_BCM47XXNFLASH)	+= bcm47xxnflash/
obj-$(CONFIG_MTD_NAND_SUNXI)		+= sunxi_nand.o
obj-$(CONFIG_MTD_NAND_PL35X)		+= pl35x_nand.o
obj-$(CONFIG_MTD_NAND_ARASAN)		+= arasan_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_nand.o mtk_ecc.o
obj-$(CONFIG_MTD_NAND_MTK)		+= mtk_ecc.o mtk_nand.o
obj-$(CONFIG_MTD_NAND_TEGRA)		+= tegra_nand.o
obj-$(CONFIG_MTD_NAND_ARASAN)		+= arasan_nand.o
obj-$(CONFIG_MTD_NAND_PL353)		+= pl353_nand.o

nand-objs := nand_base.o nand_bbt.o nand_timings.o nand_ids.o nandchip-micron.o
nand-objs := nand_base.o nand_bbt.o nand_timings.o nand_ids.o
nand-objs += nand_amd.o
nand-objs += nand_hynix.o
nand-objs += nand_macronix.o
nand-objs += nand_micron.o
nand-objs += nand_micron.o nand_micron_mt29f.o
nand-objs += nand_samsung.o
nand-objs += nand_toshiba.o
Loading