Skip to content

Commit f88fc12

Browse files
author
Boris Brezillon
committed
mtd: nand: Cleanup/rework the atmel_nand driver
This is a complete rewrite of the driver whose main purpose is to support the new DT representation where the NAND controller node is now really visible in the DT and appears under the EBI bus. With this new representation, we can add other devices under the EBI bus without risking pinmuxing conflicts (the NAND controller is under the EBI bus logic and as such, share some of its pins with other devices connected on this bus). Even though the goal of this rework was not necessarily to add new features, the new driver has been designed with this in mind. With a clearer separation between the different blocks and different IP revisions, adding new functionalities should be easier (we already have plans to support SMC timing configuration so that we no longer have to rely on the configuration done by the bootloader/bootstrap). Also note that we no longer have a custom ->cmdfunc() implementation, which means we can now benefit from new features added in the core implementation for free (support for new NAND operations for example). The last thing that we gain with this rework is support for multi-chips and multi-dies chips, thanks to the clean NAND controller <-> NAND devices representation. During this transition we also dropped support for AVR32 SoCs which should soon disappear from mainline (removal of the AVR32 arch is planned for 4.12). This new driver has been tested on several platforms (at91sam9261, at91sam9g45, at91sam9x5, sama5d3 and sama5d4) to make sure it did not introduce regressions, and it's worth mentioning that old bindings are still supported (which partly explain the positive diffstat). Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>
1 parent ef980cf commit f88fc12

File tree

10 files changed

+3298
-2750
lines changed

10 files changed

+3298
-2750
lines changed

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2244,7 +2244,7 @@ M: Wenyou Yang <wenyou.yang@atmel.com>
22442244
M: Josh Wu <rainyfeeling@outlook.com>
22452245
L: linux-mtd@lists.infradead.org
22462246
S: Supported
2247-
F: drivers/mtd/nand/atmel_nand*
2247+
F: drivers/mtd/nand/atmel/*
22482248

22492249
ATMEL SDMMC DRIVER
22502250
M: Ludovic Desroches <ludovic.desroches@microchip.com>

drivers/mtd/nand/Kconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,11 @@ config MTD_NAND_CS553X
306306
If you say "m", the module will be called cs553x_nand.
307307

308308
config MTD_NAND_ATMEL
309-
tristate "Support for NAND Flash / SmartMedia on AT91 and AVR32"
310-
depends on ARCH_AT91 || AVR32
309+
tristate "Support for NAND Flash / SmartMedia on AT91"
310+
depends on ARCH_AT91
311311
help
312312
Enables support for NAND Flash / Smart Media Card interface
313-
on Atmel AT91 and AVR32 processors.
313+
on Atmel AT91 processors.
314314

315315
config MTD_NAND_PXA3xx
316316
tristate "NAND support on PXA3xx and Armada 370/XP"

drivers/mtd/nand/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ obj-$(CONFIG_MTD_NAND_SHARPSL) += sharpsl.o
2424
obj-$(CONFIG_MTD_NAND_NANDSIM) += nandsim.o
2525
obj-$(CONFIG_MTD_NAND_CS553X) += cs553x_nand.o
2626
obj-$(CONFIG_MTD_NAND_NDFC) += ndfc.o
27-
obj-$(CONFIG_MTD_NAND_ATMEL) += atmel_nand.o
27+
obj-$(CONFIG_MTD_NAND_ATMEL) += atmel/
2828
obj-$(CONFIG_MTD_NAND_GPIO) += gpio.o
2929
omap2_nand-objs := omap2.o
3030
obj-$(CONFIG_MTD_NAND_OMAP2) += omap2_nand.o

drivers/mtd/nand/atmel/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
obj-$(CONFIG_MTD_NAND_ATMEL) += atmel-nand-controller.o atmel-pmecc.o
2+
3+
atmel-nand-controller-objs := nand-controller.o
4+
atmel-pmecc-objs := pmecc.o

0 commit comments

Comments
 (0)