From: <markus.stockhausen@gmx.de>
To: "'Miquel Raynal'" <miquel.raynal@bootlin.com>
Cc: <vigneshr@ti.com>, <richard@nod.at>, <tudor.ambarus@linaro.org>,
<linux-mtd@lists.infradead.org>,
"'Chris Packham'" <Chris.Packham@alliedtelesis.co.nz>
Subject: Realtek ECC engine (was NAND errors)
Date: Mon, 11 Aug 2025 15:58:56 +0200 [thread overview]
Message-ID: <667201dc0ac8$153da250$3fb8e6f0$@gmx.de> (raw)
Hi Miquel,
on the weekend I was able to hack together a very basic working version of
the Realtek ECC engine. See https://github.com/openwrt/openwrt/pull/19746
Until now I was only focused on the devices that are available for testing
(Linksys LGS328C & LGS352C). Driver can now handle exactly the identified
data layout:
- 2048 bytes data (4*512 bytes)
- 64 bytes OOB consisting of
- 4*6 bytes tag
- 4*10 bytes ECC
There are two things I do not yet understand:
1. Interaction between request handling and mtd_ooblayout_ops. For now I
simply take the request data & oob buffers and put data where it "seems"
right.
2. The hardware does a lot of good things. It returns ok/errors/bitflips
and I can simply pass them back. But how do I tell the upper layers that
4 bitflips are getting close to the 6 bits the engine can handle. Is it
in the driver or DTS? That currently reads.
soc: soc {
compatible = "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
ranges = <0x0 0x18000000 0x20000>;
ecc0: ecc@1a600 {
status = "okay";
compatible = "realtek,nand-ecc-engine";
reg = <0x1a600 0x54>;
};
snand: spi@1a400 {
compatible = "realtek,rtl9301-snand";
reg = <0x1a400 0x44>;
interrupt-parent = <&intc>;
interrupts = <19 2>;
clocks = <&lx_clk>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
flash@0 {
compatible = "spi-nand";
reg = <0>;
nand-ecc-engine = <&ecc0>;
partitions {
compatible = "fixed-partitions";
Thanks in advance.
Markus
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next reply other threads:[~2025-08-11 15:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-11 13:58 markus.stockhausen [this message]
2025-08-18 7:56 ` Realtek ECC engine (was NAND errors) Miquel Raynal
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='667201dc0ac8$153da250$3fb8e6f0$@gmx.de' \
--to=markus.stockhausen@gmx.de \
--cc=Chris.Packham@alliedtelesis.co.nz \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.com \
--cc=richard@nod.at \
--cc=tudor.ambarus@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.