mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* nand "BCH decoding failed" when using bch8_hw_romcode ecc mode
@ 2022-03-16 13:45 Tibault Damman
  2022-03-17  7:46 ` Sascha Hauer
  0 siblings, 1 reply; 7+ messages in thread
From: Tibault Damman @ 2022-03-16 13:45 UTC (permalink / raw)
  To: barebox

Hi all

Due to component shortages, I'm trying to move an old board from a Phytec Phycore omap4430 with 8bit nand (Micron MT29F4G08ABBDAH4) to an omap4460 variant with 16bit nand (Micron MT29F8G16ADBDAH4).

To be compatible with Linux 5.4, the rootfs nand (ubi) partition needs to be in BCH8_HW_ROMCODE ecc mode instead of the default BCH8_HW.
When I use ubiformat or ubiattach from barebox in this mode though, I get a bazillion "BCH decoding failed" prints (which I did not get on the omap4430)

> barebox@Phytec phyCORE-OMAP4460:/ ubiattach -O 2048 /dev/nand0.sys
> ...
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> nand0.root: error -74 (ECC error) while reading 512 bytes from PEB 887:0
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> nand0.root: error -74 (ECC error) while reading 512 bytes from PEB 888:0
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> BCH decoding failed
> ...

I tried these combinations:
* omap4430 (8bit nand) + BCH8_HW ecc: works (but not compatible with Linux)
* omap4430 (8bit nand) + BCH8_HW_ROMCODE ecc: works
* omap4460 (16bit nand) + BCH8_HW ecc: works (but not compatible with Linux)
* omap4460 (16bit nand) + BCH8_HW_ROMCODE ecc: does not work

I've reproduced this on the following barebox versions:
* phytec's 2013.06 fork
* 2019.07.0 (which I've been (successfully) using for omap4430)
* the latest 2020.03.0

Any clues what could be going wrong here?

Maybe the 8/16bit thing is a red herring, but it was the most obvious difference.
I've tried setting the nand device width to 16 (instead of 0 (auto)) in the board file, but that didn't change the above behaviour.

(I've also noticed the ubi tools keep assuming the subpage size is 512, when the nand has no subpages. Passing -s 2048 and -O 2048 works for the omap4430 though.)

Thanks

Tibault

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-03-21  8:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-16 13:45 nand "BCH decoding failed" when using bch8_hw_romcode ecc mode Tibault Damman
2022-03-17  7:46 ` Sascha Hauer
2022-03-18  9:49   ` Tibault Damman
2022-03-18 10:32   ` Tibault Damman
2022-03-18 11:59     ` Sascha Hauer
2022-03-18 21:41       ` Trent Piepho
2022-03-21  8:04       ` Tibault Damman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox