[U-Boot-Users] [PATCH] MTD update

William Juul william.juul at datarespons.no
Wed Nov 7 12:29:45 CET 2007


Update MTD to that of Linux 2.6.22.1

A lot changed in the Linux MTD code, since it was last ported from
Linux to U-Boot. This patch takes U-Boot NAND support to the level
of Linux 2.6.22.1 and will enable support for very large NAND devices
(4KB pages) and ease the compatibility between U-Boot and Linux
filesystems and drivers.

This patch is tested on two custom boards with PPC and ARM
processors running YAFFS in U-Boot and Linux using gcc-4.1.2
cross compilers.

MAKEALL ppc/arm has some issues:
 * DOC/OneNand/nand_spl is not building (I have not tried porting
   these parts, and since I do not have any HW and I am not familiar
   with this code/HW I think its best left to someone else.)

Except for the issues mentioned above, I have ported all drivers
necessary to run MAKEALL ppc/arm without errors and warnings. Many
drivers were trivial to port, but some were not so trivial. The
following drivers must be examined carefully and maybe rewritten to
some degree:
 cpu/ppc4xx/ndfc.c
 cpu/arm926ejs/davinci/nand.c
 board/delta/nand.c
 board/zylonite/nand.c

Signed-off-by: William Juul <william.juul at datarespons.no>
Signed-off-by: Stig Olsen <stig.olsen at tandberg.com>
----

We have set up a git repository were you can pull the patch:
http://git.tandberg.com/tandberg/u-boot.git

The master branch is tracking the official u-boot.git master branch.
The branch mtd-update-1.3.0-rc3 is based on tag v1.3.0-rc3
The branch mtd-update will (eventually) continue to track  u-boot updates
and then spin off mtd-update-1.3.0 when v1.3.0 is released.

The file drivers/nand/nand_base.c contains the struct nand_oob_128 which
is not (yet) part of Linux mtd. I will try to figure out if this implementation
is valid by asking on the linux-mtd mailing list.

Best regards
William Juul


Summary of changes between current head on branch
mtd-update-1.3.0-rc3 and u-boot tag v1.3.0-rc3:
 board/bf537-stamp/nand.c         |   43 +-
 board/dave/PPChameleonEVB/nand.c |   49 +-
 board/delta/nand.c               |   41 +-
 board/esd/common/esd405ep_nand.c |   42 +-
 board/freescale/m5329evb/nand.c  |   42 +-
 board/nc650/nand.c               |   78 +-
 board/netstar/nand.c             |   20 +-
 board/prodrive/alpr/nand.c       |   59 +-
 board/prodrive/pdnb3/nand.c      |   53 +-
 board/sc3/sc3nand.c              |   44 +-
 board/tqm8272/tqm8272.c          |   34 +-
 board/zylonite/nand.c            |   39 +-
 common/cmd_doc.c                 |    5 +-
 common/cmd_nand.c                | 1516 +++++++++---------
 cpu/arm926ejs/davinci/nand.c     |   41 +-
 cpu/ppc4xx/ndfc.c                |   57 +-
 drivers/nand/diskonchip.c        |  567 ++++----
 drivers/nand/nand_base.c         | 3449 ++++++++++++++++++++------------------
 drivers/nand/nand_bbt.c          |  552 ++++--
 drivers/nand/nand_ecc.c          |   21 +-
 drivers/nand/nand_ids.c          |  169 ++-
 drivers/nand/nand_util.c         |  359 +++--
 include/common.h                 |    2 +
 include/linux/err.h              |   45 +
 include/linux/mtd/blktrans.h     |   81 +
 include/linux/mtd/compat.h       |    7 +-
 include/linux/mtd/doc2000.h      |  217 ++--
 include/linux/mtd/inftl-user.h   |   91 +
 include/linux/mtd/jffs2-user.h   |   35 +
 include/linux/mtd/mtd-abi.h      |  137 ++-
 include/linux/mtd/mtd.h          |  154 ++-
 include/linux/mtd/nand.h         |  450 ++++--
 include/linux/mtd/nftl-user.h    |   76 +
 include/linux/mtd/nftl.h         |   93 +-
 include/linux/mtd/ubi-header.h   |  360 ++++
 include/linux/mtd/ubi-user.h     |  161 ++
 include/nand.h                   |    3 +-
 37 files changed, 5314 insertions(+), 3878 deletions(-)
 create mode 100644 include/linux/err.h
 create mode 100644 include/linux/mtd/blktrans.h
 create mode 100644 include/linux/mtd/inftl-user.h
 create mode 100644 include/linux/mtd/jffs2-user.h
 create mode 100644 include/linux/mtd/nftl-user.h
 create mode 100644 include/linux/mtd/ubi-header.h
 create mode 100644 include/linux/mtd/ubi-user.h

-------------------------------------------------
William Juul, Senior Development Engineer
Data Respons Norge AS
Sandviksveien 26
P.O. Box 489
NO-1323 Høvik, Norway

www.datarespons.no
-------------------------------------------------




More information about the U-Boot mailing list