mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Tibault Damman <tibault.damman@basalte.be>
To: "barebox@lists.infradead.org" <barebox@lists.infradead.org>
Subject: nand "BCH decoding failed" when using bch8_hw_romcode ecc mode
Date: Wed, 16 Mar 2022 13:45:31 +0000	[thread overview]
Message-ID: <DB7PR04MB424951EBC916B7A1E0A1B274E8119@DB7PR04MB4249.eurprd04.prod.outlook.com> (raw)

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


             reply	other threads:[~2022-03-16 13:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16 13:45 Tibault Damman [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DB7PR04MB424951EBC916B7A1E0A1B274E8119@DB7PR04MB4249.eurprd04.prod.outlook.com \
    --to=tibault.damman@basalte.be \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox