Skip to content

Commit ae02ab0

Browse files
Alex Smithcomputersforpeace
authored andcommitted
mtd: nand: jz4780: driver for NAND devices on JZ4780 SoCs
Add a driver for NAND devices connected to the NEMC on JZ4780 SoCs, as well as the hardware BCH controller. DMA is not currently implemented. While older 47xx SoCs also have a BCH controller, they are incompatible with the one in the 4780 due to differing register/bit positions, which would make implementing a common driver for them quite messy. Signed-off-by: Alex Smith <alex.smith@imgtec.com> Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: linux-mtd@lists.infradead.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Harvey Hunt <harvey.hunt@imgtec.com> Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com> [Brian: fixed a few small mistakes] Signed-off-by: Brian Norris <computersforpeace@gmail.com>
1 parent 48bf35d commit ae02ab0

File tree

5 files changed

+857
-0
lines changed

5 files changed

+857
-0
lines changed

drivers/mtd/nand/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,13 @@ config MTD_NAND_JZ4740
519519
help
520520
Enables support for NAND Flash on JZ4740 SoC based boards.
521521

522+
config MTD_NAND_JZ4780
523+
tristate "Support for NAND on JZ4780 SoC"
524+
depends on MACH_JZ4780 && JZ4780_NEMC
525+
help
526+
Enables support for NAND Flash connected to the NEMC on JZ4780 SoC
527+
based boards, using the BCH controller for hardware error correction.
528+
522529
config MTD_NAND_FSMC
523530
tristate "Support for NAND on ST Micros FSMC"
524531
depends on PLAT_SPEAR || ARCH_NOMADIK || ARCH_U8500 || MACH_U300

drivers/mtd/nand/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ obj-$(CONFIG_MTD_NAND_MPC5121_NFC) += mpc5121_nfc.o
4949
obj-$(CONFIG_MTD_NAND_VF610_NFC) += vf610_nfc.o
5050
obj-$(CONFIG_MTD_NAND_RICOH) += r852.o
5151
obj-$(CONFIG_MTD_NAND_JZ4740) += jz4740_nand.o
52+
obj-$(CONFIG_MTD_NAND_JZ4780) += jz4780_nand.o jz4780_bch.o
5253
obj-$(CONFIG_MTD_NAND_GPMI_NAND) += gpmi-nand/
5354
obj-$(CONFIG_MTD_NAND_XWAY) += xway_nand.o
5455
obj-$(CONFIG_MTD_NAND_BCM47XXNFLASH) += bcm47xxnflash/

0 commit comments

Comments
 (0)