NAND on MV78100
Hi!
I am currently working on board support for a Marvell MV78100 based board. The MV78100 uses the same Orion SOC components as e.g. the Kirkwood which is quite well supported from OpenRD and SheevaPlug.
After some struggling I got the Orion NAND driver working, it detects the NAND chip properly (512MB) and assigns a partition. Everything seems OK so far.
But when I read from the device, e.g. just by "cat /dev/mtdblock1 | wc -c" it starts to fail with "uncorrectable error" after exactly 1MB (1024*1024).
This seems pretty strange to me and I have no real idea where to look for the problem. I have the Orion NAND driver working cleanly with the very same kernel version on a Kirkwood based board without problems.
Any hint on where to look would be *very* much appreciated ;)
Thanks!
Cheers
nils
Signature · 4 lines
kernel concepts GbR Tel: +49-271-771091-12 Sieghuetter Hauptweg 48 D-57072 Siegen Mob: +49-176-21024535 http://www.kernelconcepts.de
Quoted 5 lines · Nils Faerber
Hi!
I am currently working on board support for a Marvell MV78100 based board. The MV78100 uses the same Orion SOC components as e.g. the Kirkwood which is quite well supported from OpenRD and SheevaPlug.
Quoted 7 lines
After some struggling I got the Orion NAND driver working, it detects the NAND chip properly (512MB) and assigns a partition. Everything seems OK so far.
But when I read from the device, e.g. just by "cat
/dev/mtdblock1| wc -c" it starts to fail with "uncorrectable error" after exactly 1MB (1024*1024).
This is most likely due to a difference in the ECC model used. The quick "fix" would be to reformat the NAND (at least from the offset where it fails) using the Linux supported 1-bit ECC.
The Marvell LSPs (and most unfortunately the bootrom) are using a 4-bit software ECC implementation that is poorly optimized, and layered backward.
Nicolas
Am 23.09.2010 21:07, schrieb Nicolas Pitre:
Quoted 13 lines · Nils Faerber
Quoted 11 lines
I am currently working on board support for a Marvell MV78100 based board. The MV78100 uses the same Orion SOC components as e.g. the Kirkwood which is quite well supported from OpenRD and SheevaPlug.
After some struggling I got the Orion NAND driver working, it detects the NAND chip properly (512MB) and assigns a partition. Everything seems OK so far.
But when I read from the device, e.g. just by "cat
/dev/mtdblock1| wc -c" it starts to fail with "uncorrectable error" after exactly 1MB (1024*1024).
Quoted 6 lines
This is most likely due to a difference in the ECC model used. The quick "fix" would be to reformat the NAND (at least from the offset where it fails) using the Linux supported 1-bit ECC.
The Marvell LSPs (and most unfortunately the bootrom) are using a 4-bit software ECC implementation that is poorly optimized, and layered backward.
This could be the reason since the Marvell LSP kernel was used before on this board.
Reformatting means flash_erase?
I was scared to hose my flash by wrongly erasing it so I tried reading only first ;)
But after your assurance I tried to flash_eraseall one partition and see
- yeha, works!
Now I just might have another issue - since I do not know some of the board's details like RAM timing and I do not have a proper JTAG setup I do not want to touch the pre-installed Marvell-based U-Boot. But U-Boot shall read the at least the kernel from the NAND. But I would guess that since the ECC is different it will not work that easily? Well, as fallback we still have a NOR flash which could hold the kernel.
Ah, just tried and see - the Marvell UBoot obviously ignores the ECC when reading - perfect ;)
Thank you!
Quoted 1 line
Nicolas
Cheers
nils
Signature · 4 lines
kernel concepts GbR Tel: +49-271-771091-12 Sieghuetter Hauptweg 48 Fax: +49-271-771091-19 D-57072 Siegen Mob: +49-176-21024535 http://www.kernelconcepts.de