public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Andrea Scian <andrea.scian@dave.eu>
Cc: "linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
	"michal.simek@amd.com" <michal.simek@amd.com>,
	 "richard@nod.at" <richard@nod.at>,
	 "vigneshr@ti.com" <vigneshr@ti.com>,
	"amit.kumar-mahapatra@amd.com" <amit.kumar-mahapatra@amd.com>
Subject: Re: PL353 NAND Controller - SW vs HW ECC
Date: Tue, 24 Feb 2026 09:07:54 +0100	[thread overview]
Message-ID: <87jyw2r2cl.fsf@bootlin.com> (raw)
In-Reply-To: <f6a240d3-2447-4edf-9314-347160878d9a@dave.eu> (Andrea Scian's message of "Mon, 23 Feb 2026 17:39:50 +0100")

Hi Andrea,

>>>> This is obviously just speculation, maybe the errata you mentioned above
>>>> will bring an obvious hardware failure to our attention. The Arasan IP
>>>> used on ZynqMP also suffers from a similar limitation (not able to
>>>> correctly report failures) and I decided to implement one path using the
>>>> software BCH engine, with a time penalty of course.
>>>
>>> So that's nearly the same result I'm trying to get with Zynq7k
>>> platform ;-)
>> In this case, I can only recommend the blog post I wrote for the
>> Arasan
>> controller. I believe it should be easier to do as you won't need the
>> polynomial retro-engineering.
>> Link:
>> https://bootlin.com/blog/supporting-a-misbehaving-nand-ecc-engine/
>
> Thanks for this detailed article!
> I think I'll move to hamming code (if I make it work in u-boot) or BCH
> (after evaluating the performance impact)

Either you want to leverage the engine in the write path (because it is
faster than doing it with the CPU) and you must implement Hamming as
that's the only capability of the controller, or you want better
strength and in this case you do not have anything to do except
configuring for software ECC engines in the DT.

But for an upstream fix, which I would welcome, you need to use the
Hamming hardware for the write path and software in the read path.

> I have some issue with Linux to U-Boot interoperability (single bit
> error are not correctly handled in u-boot hamming implementation), is
> this the right mailing list to ask for advice or should I move to
> u-boot ML?

You could create a thread with both, I guess, if there is an
interoperability issue.

Thanks,
Miquèl

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

      reply	other threads:[~2026-02-24  8:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-09 11:37 PL353 NAND Controller - SW vs HW ECC Andrea Scian
2026-02-10 10:12 ` Miquel Raynal
2026-02-10 14:14   ` Andrea Scian
2026-02-12 10:40     ` Miquel Raynal
2026-02-23 16:39       ` Andrea Scian
2026-02-24  8:07         ` Miquel Raynal [this message]

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=87jyw2r2cl.fsf@bootlin.com \
    --to=miquel.raynal@bootlin.com \
    --cc=amit.kumar-mahapatra@amd.com \
    --cc=andrea.scian@dave.eu \
    --cc=linux-mtd@lists.infradead.org \
    --cc=michal.simek@amd.com \
    --cc=richard@nod.at \
    --cc=vigneshr@ti.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