Skip to contentSkip to conversation

nand/mpc512x: Add MPC512x NAND support (NFC)

PATCH Superseded Stefan Roese 1 participant 1 message Jun 9, 2009

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 nand/mpc512x: Add MPC512x NAND support (NFC)

This patch adds NAND Flash Controller driver for MPC5121 revision 2. All device features, except hardware ECC and power management, are supported.

This NFC driver replaces the one orignally posted by John Rigby:

"[PATCH] Freescale NFC NAND driver"

It's a port of the Linux driver version posted by Piotr Ziecik a few weeks ago. Using this driver has the following advantages (from my point of view):

- Compatibility with the Linux NAND driver (e.g. ECC usage)
- Better code quality in general
- Resulting U-Boot image is a bit smaller (approx. 3k)
- Better to sync with newer Linux driver versions

The only disadvantage I can see, is that HW-ECC is not supported right now. But this could be added later (e.g. port from Linux driver after it's supported there). Using HW-ECC on the MCP5121 NFC has a general problem because of the ECC usage in the spare area. This collides with JFFS2 for example.

Cc Piotr Ziecik <[email protected]>
Cc Wolfgang Denk <[email protected]>
Cc John Rigby <[email protected]>
Cc Scott Wood <[email protected]>

---
v2:
- Added (C) for myself
- Reduced line length of commit text
- Fixed spelling error in commit text
- chip select function is implemented as weak default so that board may implement a board specific variant (e.g. MPC5121ADS)

 drivers/mtd/nand/Makefile      |    1 +
 drivers/mtd/nand/mpc5121_nfc.c |  671 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 672 insertions(+), 0 deletions(-)
 create mode 100644 drivers/mtd/nand/mpc5121_nfc.c
drivers/mtd/nand/Makefile +1 -0
index 471cd6b..71dd5b9 100644
@@ -40,6 +40,7 @@ COBJS-$(CONFIG_DRIVER_NAND_BFIN) += bfin_nand.o
 COBJS-$(CONFIG_NAND_DAVINCI) += davinci_nand.o
 COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_nand.o
 COBJS-$(CONFIG_NAND_FSL_UPM) += fsl_upm.o
+COBJS-$(CONFIG_NAND_MPC5121_NFC) += mpc5121_nfc.o
 COBJS-$(CONFIG_NAND_NOMADIK) += nomadik.o
 COBJS-$(CONFIG_NAND_S3C2410) += s3c2410_nand.c
 COBJS-$(CONFIG_NAND_S3C64XX) += s3c64xx.o
drivers/mtd/nand/mpc5121_nfc.c new file +671 -0

671 lines not on this page · raw message

Signature · 1 line
1.6.3.2