U-Boot OMAP GPMC ECC change

Colin Foster colin.foster at in-advantage.com
Wed May 10 17:38:11 CEST 2023


Hi Roger,

On Wed, May 10, 2023 at 12:42:43PM +0300, Roger Quadros wrote:
> Hi Colin,
> 
> On 09/05/2023 18:31, Colin Foster wrote:
> > Hi Roger,
> > 
> > I was looking to test my system against U-Boot 2023.04. I'm running an
> > OMAP 4460 SOM (I've been waiting to get kernel acceptance before U-Boot,
> > but that has slipped) and it boots from NAND.
> > 
> > When I jumped from 2023.01 to 2023.04, I noticed I get spammed in the
> > SPL by "omap-elm: uncorrectable ECC errors". I bisected, and this seems
> > to be the result of commit 04fcd25873 ("mtd: rawnand: omap_gpmc: Fix
> > BCH6/16 HW based correction").
> 
> oops. Sorry about that.

No worries!

> > 
> > Is the multi-sector ECC generation something that should work in a
> > backward-compatible way? Do you know of anything that might be going
> > wrong here?
> 
> The patch wasn't supposed to break anything.
> I do not yet know what could be wrong. Most likely a wrong ECC
> configuration is being used.
> 
> Could you please share what ECC configuration you are using on your board?

This is still out-of-U-Boot. I have an include/configs/our_product.h
file with this:

"""
#define CFG_SYS_NAND_ECCPOS             {2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, \
                                         13, 14, 15, 16, 17, 18, 19, 20, 21, 22, \
                                         23, 24, 25, 26, 27, 28, 29, 30, 31, 32, \
                                         33, 34, 35, 36, 37, 38, 39, 40, 41, \
                                         42, 43, 44, 45, 46, 47, 48, 49, 50, 51, \
                                         52, 53, 54, 55, 56, 57}

#define CFG_SYS_NAND_ECCBYTES   14
#define CFG_SYS_NAND_MAX_ECCPOS 57
#define CFG_SYS_NAND_ECCSIZE            512
#define CFG_SYS_NAND_MAX_OOBFREE        2
"""


> Can you please point me to the Linux device tree file if it exists?

This is the latest submission. Still not accepted - I need to find time
to button everything up and resubmit. My plan of attack was Kernel
Acceptance, then U-Boot. Unfortunately my company lets the pesky
"Shipping products" step get in the way :-)

https://lkml.org/lkml/2023/2/22/939

Or if you just want the ECC part:

+	nandflash: nand at 0,0 {
+		compatible = "ti,omap2-nand";
+		reg = <0 0 4>;
+		interrupt-parent = <&gpmc>;
+
+		nand-bus-width = <16>;
+		ti,nand-ecc-opt = "bch8";
+		ti,elm-id=<&elm>;
+		linux,mtd-name = "micron,nand";


I think that's all the info you're looking for. Let me know if I missed
something.


Colin Foster



More information about the U-Boot mailing list