[U-Boot] NAND write error with HW ECC on OMAP3

Andreas Bießmann andreas.devel at googlemail.com
Wed Sep 4 10:54:03 CEST 2013


Dear Ash Charles,

On 09/04/2013 09:35 AM, Andreas Bießmann wrote:
> Dear Ash Charles,
> 
> On 09/03/2013 09:34 PM, Ash Charles wrote:
>> Hi,
>>
>> When using 'nandecc hw' on an OMAP3 platform, data is not being
>> correctly written to NAND.  I see the issue on 2013.10-rc2 and 2013.07
>> but not on 2012.10.  Specifically, when I read back a SPL binary
>> written with hardware Hamming ECC, I don't get a matching CRC.  With
>> the BCH8 ECC algorithm, the CRC is correct (but SPL must be written
>> with Hamming otherwise the board doesn't boot)
>>
>> I've shown my steps here: http://pastebin.com/tLZsr9zH
>> The expected CRC is 46745188.
>>
>> Any suggestions/ideas much appreciated!
> 
> I'd swear this worked when I changed the command to use BCH ... I'll
> check it again today.

I can't confirm your complaints. Here it works (at least on tricorder,
which utilizes BCH for U-Boot section in SPL):

---8<---
U-Boot SPL 2013.10-rc2-00014-g2d5878e (Sep 04 2013 - 10:39:57)
reading u-boot.img
reading u-boot.img


U-Boot 2013.10-rc2-00014-g2d5878e (Sep 04 2013 - 10:39:57)

OMAP36XX/37XX-GP ES1.2, CPU-OPP2, L3-200MHz, Max CPU Clock 1 Ghz
OMAP3 Tricorder + LPDDR/NAND
I2C:   ready
DRAM:  128 MiB
NAND:  512 MiB
MMC:   OMAP SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Board : serial
Die ID #246000029e38000001683b060102002d
Hit any key to stop autoboot:  0
OMAP3 Tricorder # fatload mmc 0 ${loadaddr} MLO
reading MLO
55052 bytes read in 11 ms (4.8 MiB/s)
OMAP3 Tricorder # nandecc hw
1-bit hamming HW ECC selected
OMAP3 Tricorder # nand erase.part SPL

NAND erase.part: device 0 offset 0x0, size 0x20000
Erasing at 0x0 -- 100% complete.
OK
OMAP3 Tricorder # crc32 ${loadaddr} ${filesize}
CRC32 for 82000000 ... 8200d70b ==> b182f0a2
OMAP3 Tricorder # nand write ${loadaddr} SPL ${filesize}

NAND write: device 0 offset 0x0, size 0xd70c
 55052 bytes written: OK
OMAP3 Tricorder # nand read 0x80000000 SPL ${filesize}

NAND read: device 0 offset 0x0, size 0xd70c
 55052 bytes read: OK
OMAP3 Tricorder # crc32 0x80000000 ${filesize}
CRC32 for 80000000 ... 8000d70b ==> b182f0a2
OMAP3 Tricorder #
--->8---

The 14 patches on top of -rc2 are just local board changes (will be sent
soon):

---8<---
2d5878e (HEAD, tricorder-TOT) tricorder: fixup for led.c
c3806ea tricorder: read kernel directly from NAND
c158ec1 tricorder: switch to alternative memtest
9bcc57b tricorder: Make u-boot faster
441857b tricorder: add led support
b8bb65a tricorder: panic() on unknown board
8c5e0a8 tricorder: add tricordereeprom command
4c86cad tricorder: add mtdparts to environment
3ac9838 tricorder: add cmdline history
7fe344d tricorder: move commonargs to common settings
3bd1a05 tricorder: add configuration for a flashcard u-boot
d2578c5 tricorder: use generic provided loadaddr
649f8dc tricorder: update flash partitioning
e34c01a tricorder: remove lcdmode from bootargs
fb18fa9 (tag: v2013.10-rc2, origin/master, origin/HEAD, cs/master)
Prepare v2013.10-rc2
--->8---

Best regards

Andreas Bießmann


More information about the U-Boot mailing list