[U-Boot] [PATCH v3] nand/mpc512x: Add MPC512x NAND support (NFC)
Wolfgang Denk
wd at denx.de
Sun Jun 14 20:11:21 CEST 2009
Dear Stefan,
In message <1244559423-15020-1-git-send-email-sr at denx.de> you wrote:
> 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"
I think ther emust be still problems with that driver.
I tried and enabled mtdparts and JFFS2 support, but I get strange
errors.
For example on MPS5121ADS:
...
U-Boot 2009.06-rc3-00151-g2ac050e-dirty (Jun 14 2009 - 19:31:39)
MPC512X
CPU: MPC5121e rev. 2.0, Core e300c4 at 400 MHz, CSB at 200 MHz
Board: ADS5121 rev. 0x0400 (CPLD rev. 0x05)
I2C: ready
DRAM: 512 MB
FLASH: 64 MB
NAND: 1024 MiB
PCI: Bus Dev VenId DevId Class Int
00 15 8086 107c 0200 00
...
=> chpart nand0,0
+ id=1: nor0 67108864 bytes fc000000.flash
+ id=2: nand0 536870912 bytes mpc5121.nand
partition changed to nand0,0
=> ls
Scanning JFFS2 FS: read_nand_cached: error reading nand off 0x75fe00 size 8192 bytes
read_nand_cached: error reading nand off 0x77fe00 size 8192 bytes
read_nand_cached: error reading nand off 0x760000 size 8192 bytes
read_nand_cached: error reading nand off 0xeffe00 size 8192 bytes
read_nand_cached: error reading nand off 0xf1fe00 size 8192 bytes
read_nand_cached: error reading nand off 0xf00000 size 8192 bytes
read_nand_cached: error reading nand off 0x905fe00 size 8192 bytes
read_nand_cached: error reading nand off 0x907fe00 size 8192 bytes
read_nand_cached: error reading nand off 0x9060000 size 8192 bytes
read_nand_cached: error reading nand off 0x909fe00 size 8192 bytes
read_nand_cached: error reading nand off 0x9080000 size 8192 bytes
read_nand_cached: error reading nand off 0xb3ffe00 size 8192 bytes
read_nand_cached: error reading nand off 0xb400000 size 8192 bytes
read_nand_cached: error reading nand off 0xc5ffe00 size 8192 bytes
read_nand_cached: error reading nand off 0xc600000 size 8192 bytes
read_nand_cached: error reading nand off 0xfaffe00 size 8192 bytes
read_nand_cached: error reading nand off 0xfb1fe00 size 8192 bytes
read_nand_cached: error reading nand off 0xfb00000 size 8192 bytes
read_nand_cached: error reading nand off 0xfb3fe00 size 8192 bytes
read_nand_cached: error reading nand off 0xfb20000 size 8192 bytes
read_nand_cached: error reading nand off 0x1f05fe00 size 8192 bytes
read_nand_cached: error reading nand off 0x1f07fe00 size 8192 bytes
read_nand_cached: error reading nand off 0x1f060000 size 8192 bytes
read_nand_cached: error reading nand off 0x1ffbfe00 size 8192 bytes
read_nand_cached: error reading nand off 0x1ffdfe00 size 8192 bytes
read_nand_cached: error reading nand off 0x1ffc0000 size 8192 bytes
read_nand_cached: error reading nand off 0x1ffffe00 size 8192 bytes
read_nand_cached: error reading nand off 0x1ffe0000 size 8192 bytes done.
=>
Note that the debug output above indicates that the partition support
seems to see only 512 MB of NAND flash, while there are actually 1024
MB available (see U-Boot start message above).
On ARIA I see this:
=> nand bad
Device 0 bad blocks:
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
nand_read_bbt: Bad block at 0x01480000
01480000
07f80000
07fa0000
07fc0000
07fe0000
=> nand bad
Device 0 bad blocks:
01480000
07f80000
07fa0000
07fc0000
07fe0000
Why does the output of the two invocations of the "nand bad" command
differ?
Are above lines debug messages that should be silenced, or is it
useful information that should always be printed?
Then:
=> chpar nand0,0
partition changed to nand0,0
=> ls
Scanning JFFS2 FS: read_nand_cached: error reading nand off 0x147fe00 size 8192 bytes
read_nand_cached: error reading nand off 0x1480000 size 8192 bytes ...... read_nand_cached: error reading nand off 0x7fffe00 size 8192 bytes done.
-rwxr-xr-x 26616 Wed Apr 02 00:27:17 2008 zipnote
-rwxr-xr-x 26616 Wed Apr 02 00:27:17 2008 zipsplit
-rwxr-xr-x 1731 Tue Apr 01 23:20:08 2008 zless
-rwxr-xr-x 2605 Tue Apr 01 23:20:08 2008 zmore
-rwxr-xr-x 5234 Tue Apr 01 23:20:08 2008 znew
-rwxr-xr-x 22260 Tue Apr 01 23:24:04 2008 zsoelim
-rwxr-xr-x 15088 Tue Apr 01 22:51:21 2008 yes
-rwxr-xr-x 67 Tue Apr 01 23:20:08 2008 zcmp
-rwxr-xr-x 4417 Tue Apr 01 23:20:08 2008 zdiff
-rwxr-xr-x 62 Tue Apr 01 23:20:08 2008 zegrep
...
What do the "read_nand_cached" error messages mean? They kind of
match the bad block information above - so is this debug code that
should be silenced?
Also, do you think it is normal that the listing above takes 6.5
seconds or so - per line of output?!?!
Any help appreciated.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I can type faster than I can move a mouse, so I find menu-driven
drawing packages time consuming and frustrating. - W. R. Stevens
More information about the U-Boot
mailing list