[U-Boot] BCH8 support when we do not have ELM h/w engine.
Enric Balletbo Serra
eballetbo at gmail.com
Wed Dec 4 18:43:16 CET 2013
Dear Pekon,
I'm trying to enable the support for BCH8 for platforms that do not
have ELM hardware engine. Maybe I'm missing something but my first and
quick attempt was applying the following patch:
http://pastebin.com/VUjuGChR
With this patch I'm able to switch to
OMAP_ECC_BCH8_CODE_HW_DETECTION_SW with the nandecc hw bch8 command.
Then I tried to flash a ubi rootfs into the nand, but the kernel can't
mount the filesystem, I see messages like that:
[ 3.703582] ecc unrecoverable error
[ 3.707244] UBI warning: ubi_io_read: error -74 (ECC error) while
reading 64 bytes from PEB 2:0, read only 64 bytes, retry
OTOH, if I flash the rootfs from the kernel (my board sets the ecc to
bch8) I don't have any problem, I can mount without problems.
I saw that the OOB layout is not the same when I flash the rootfs from
the u-boot or from the kernel. For example:
If the rootfs is flashed from the kernel the OOB data is like that:
U-Boot # nand dump.oob 0x680000
Page 00680000 dump:
OOB:
ff ff 79 43 68 64 3b 80
b2 46 49 4d 58 2a 6d ff
52 3f 7d 2a 7f a2 98 70
57 32 30 35 c7 ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
If the rootfs is flashed for the u-boot the OOB data is like data:
Page 00680000 dump:
OOB:
ff ff 79 43 68 64 3b 80
b2 46 49 4d 58 2a 6d 52
3f 7d 2a 7f a2 98 70 57
32 30 35 c7 ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
ff ff ff ff ff ff ff ff
Note that look the same except after byte number 16. In the first case is
ff 52 3f 7d 2a 7f a2 98 70
and in the second case is
52 3f 7d 2a 7f a2 98 70
It's possible that something is wrong writting the OOB data ? Any clue
? I'm in the right direction or completely wrong ?
Thanks in advance,
Enric
More information about the U-Boot
mailing list