mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 00:34:20 +08:00
02f26ecf8c
Add marvell_nand driver which aims at replacing the existing pxa3xx_nand driver. The new driver intends to be easier to understand and follows the brand new NAND framework rules by implementing hooks for every pattern the controller might support and referencing them inside a parser object that will be given to the core at each ->exec_op() call. Raw accessors are implemented, useful to test/debug memory/filesystem corruptions. Userspace binaries contained in the mtd-utils package may now be used and their output trusted. Most of the DT nodes using the old driver kept non-optimal timings from the bootloader (even if there was some mechanisms to derive them if the chip was ONFI compliant). The new default is to implement ->setup_data_interface() and follow the core's decision regarding the chip. Thanks to the improved timings, implementation of ONFI mode 5 support (with EDO managed by adding a delay on data sampling), merging the commands together and optimizing writes in the command registers, the new driver may achieve faster throughputs in both directions. Measurements show an improvement of about +23% read throughput and +24% write throughput. These measurements have been done with an Armada-385-DB-AP (4kiB NAND pages forced in 4-bit strength BCH ECC correction) using the userspace tool 'flash_speed' from the MTD test suite. Besides these important topics, the new driver addresses several unsolved known issues in the old driver which: - did not work with ECC soft neither with ECC none ; - relied on naked read/write (which is unchanged) while the NFCv1 embedded in the pxa3xx platforms do not implement it, so several NAND commands did not actually ever work without any notice (like reading the ONFI PARAM_PAGE or SET/GET_FEATURES) ; - wrote the OOB data correctly, but was not able to read it correctly past the first OOB data chunk ; - did not retrieve ECC bytes ; - used device tree bindings that did not allow more than one NAND chip, and did not allow to choose the correct chip select if not incrementing from 0. Plus, the Ready/Busy line used had to be 0. Old device tree bindings are still supported but deprecated. A more hierarchical view has to be used to keep the controller and the NAND chip structures clearly separated both inside the device tree and also in the driver code. Signed-off-by: Miquel Raynal <miquel.raynal@free-electrons.com> Tested-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk> Tested-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
72 lines
2.9 KiB
Makefile
72 lines
2.9 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0
|
|
#
|
|
# linux/drivers/nand/Makefile
|
|
#
|
|
|
|
obj-$(CONFIG_MTD_NAND) += nand.o
|
|
obj-$(CONFIG_MTD_NAND_ECC) += nand_ecc.o
|
|
obj-$(CONFIG_MTD_NAND_BCH) += nand_bch.o
|
|
obj-$(CONFIG_MTD_SM_COMMON) += sm_common.o
|
|
|
|
obj-$(CONFIG_MTD_NAND_CAFE) += cafe_nand.o
|
|
obj-$(CONFIG_MTD_NAND_AMS_DELTA) += ams-delta.o
|
|
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
|
|
obj-$(CONFIG_MTD_NAND_DISKONCHIP) += diskonchip.o
|
|
obj-$(CONFIG_MTD_NAND_DOCG4) += docg4.o
|
|
obj-$(CONFIG_MTD_NAND_FSMC) += fsmc_nand.o
|
|
obj-$(CONFIG_MTD_NAND_SHARPSL) += sharpsl.o
|
|
obj-$(CONFIG_MTD_NAND_NANDSIM) += nandsim.o
|
|
obj-$(CONFIG_MTD_NAND_CS553X) += cs553x_nand.o
|
|
obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o
|
|
obj-$(CONFIG_MTD_NAND_ATMEL) += atmel/
|
|
obj-$(CONFIG_MTD_NAND_GPIO) += gpio.o
|
|
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
|
|
obj-$(CONFIG_MTD_NAND_ORION) += orion_nand.o
|
|
obj-$(CONFIG_MTD_NAND_OXNAS) += oxnas_nand.o
|
|
obj-$(CONFIG_MTD_NAND_FSL_ELBC) += fsl_elbc_nand.o
|
|
obj-$(CONFIG_MTD_NAND_FSL_IFC) += fsl_ifc_nand.o
|
|
obj-$(CONFIG_MTD_NAND_FSL_UPM) += fsl_upm.o
|
|
obj-$(CONFIG_MTD_NAND_SLC_LPC32XX) += lpc32xx_slc.o
|
|
obj-$(CONFIG_MTD_NAND_MLC_LPC32XX) += lpc32xx_mlc.o
|
|
obj-$(CONFIG_MTD_NAND_SH_FLCTL) += sh_flctl.o
|
|
obj-$(CONFIG_MTD_NAND_MXC) += mxc_nand.o
|
|
obj-$(CONFIG_MTD_NAND_SOCRATES) += socrates_nand.o
|
|
obj-$(CONFIG_MTD_NAND_TXX9NDFMC) += txx9ndfmc.o
|
|
obj-$(CONFIG_MTD_NAND_NUC900) += nuc900_nand.o
|
|
obj-$(CONFIG_MTD_NAND_MPC5121_NFC) += mpc5121_nfc.o
|
|
obj-$(CONFIG_MTD_NAND_VF610_NFC) += vf610_nfc.o
|
|
obj-$(CONFIG_MTD_NAND_RICOH) += r852.o
|
|
obj-$(CONFIG_MTD_NAND_JZ4740) += jz4740_nand.o
|
|
obj-$(CONFIG_MTD_NAND_JZ4780) += jz4780_nand.o jz4780_bch.o
|
|
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_HISI504) += hisi504_nand.o
|
|
obj-$(CONFIG_MTD_NAND_BRCMNAND) += brcmnand/
|
|
obj-$(CONFIG_MTD_NAND_QCOM) += qcom_nandc.o
|
|
obj-$(CONFIG_MTD_NAND_MTK) += mtk_ecc.o mtk_nand.o
|
|
|
|
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_samsung.o
|
|
nand-objs += nand_toshiba.o
|