linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sean Nyekjaer <sean@geanix.com>
To: Miquel Raynal <miquel.raynal@bootlin.com>,
	linux-mtd <linux-mtd@lists.infradead.org>
Subject: gpmi-nand ecc
Date: Wed, 14 Apr 2021 15:13:39 +0200	[thread overview]
Message-ID: <a066668f-852e-b3fe-0e91-23f0187d6c20@geanix.com> (raw)

Hi,

I have two boards with a iMX6ULL SoC one attached to a Micron NAND flash 
(MT29F4G08ABAFAWP) and one a Toshiba (TC58BVG2S0HTAI0).

After updating the boards from u-boot 2018.07 -> 2020.01, the Micron 
fitted boards is having ECC problems(in u-boot).
U-boot 2018.07 selects ecc_strength to 18.
U-boot 2020.01 selects ecc_strength to 8, but if I hardcode u-boot to 
run the mxs_nand_legacy_calc_ecc_layout() it selects 18 bits.

The Toshiba boards always selects 8 bit ecc_strength so they have no issues.

The kernel driver (gpmi-nand.c) seems to also use the legacy method 
(Resulting 18 bits in ecc strength for the Micron NAND).
In common_nfc_set_geometry(): Both chip->ecc.strength and chip->ecc.size 
are 0.

I would expect ecc.strength to be set to 8, earlier but cannot find the 
spot where it should be set.
Is the gpmi-nand driver missing a call to nand_ecc_choose_conf()?
Maybe we need a legacy option for the kernel like u-boot.

We have +10K boards deployed so it's not so easy to switch from 18 -> 8 
bits.
I can explicit fix this in U-boot by forcing the legacy mode via a dt 
flag, but the gut feeling says this will come back to haunt us :)

/Sean

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

             reply	other threads:[~2021-04-14 13:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 13:13 Sean Nyekjaer [this message]
2021-04-19  7:32 ` gpmi-nand ecc Miquel Raynal
2021-04-19  9:34   ` Sean Nyekjaer
2021-04-19 11:44     ` Fabio Estevam

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=a066668f-852e-b3fe-0e91-23f0187d6c20@geanix.com \
    --to=sean@geanix.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=miquel.raynal@bootlin.com \
    /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;
as well as URLs for NNTP newsgroup(s).