From: <markus.stockhausen@gmx.de>
To: "'Miquel Raynal'" <miquel.raynal@bootlin.com>
Cc: <richard@nod.at>, <vigneshr@ti.com>, <linux-mtd@lists.infradead.org>
Subject: AW: [PATCH 2/2] mtd: nand: realtek-ecc: Add Realtek external ECC engine support
Date: Sun, 24 Aug 2025 21:16:39 +0200 [thread overview]
Message-ID: <015a01dc152b$9e90a990$dbb1fcb0$@gmx.de> (raw)
In-Reply-To: <87ldn8hddb.fsf@bootlin.com>
> Von: Miquel Raynal <miquel.raynal@bootlin.com>
> Gesendet: Sonntag, 24. August 2025 18:51
> ...
> +/*
> + * The Realtek ECC engine has two operation modes.
> + *
> + * - BCH6 : Generate 10 ECC bytes from 512 data bytes plus 6 tag bytes
> + * - BCH12: Generate 20 ECC bytes from 512 data bytes plus 6 tag bytes
>
> What is a tag? I believe it is Realtek wording and we need to find a
> more generic translation.
I have no real idea. They simply call it "tag". To be more precise
- tag (lowercase): means 6 oob bytes for one 512 byte block
- syndrome: means 10 ECC bytes for one 512 byte block.
- TAG (uppercase): means 16 oob bytes (tag+syndrome)
Even the register is named ECDTAR (ECC Controller DMA TAG
address register). For me tag (lowercase) is simply additional
input data that can contain arbitrary content. It can be used
for extended/auxiliary/meta data or simply padding I assume.
Looking at the data on my devices I see that tags are always
filled with 0xff. So it seems as this gets populated after erasing
data and is never overwritten afterwards.
What naming do you advise?
> > + oobregion->offset = ctx->steps * RTL_ECC_TAG_SIZE + section * ctx->parity_size;
> > + oobregion->length = ctx->parity_size;
>
> Please reserve 2 bytes for BBM.
>
> For me it looks like you have a bit free section and a bit ECC
> section. If that simplifies your life, you can just return a single
> section for both.
The first two "tag" bytes seem to be designated for BBM according
to my information. Will adapt the first oob region offset/size.
Do I need to declare the BBM area somehow additionally?
Thanks for the other feedback. Will implement that in v2.
Markus
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2025-08-24 19:16 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-18 9:27 [PATCH 0/2] Realtek ECC engine Markus Stockhausen
2025-08-18 9:27 ` Markus Stockhausen
2025-08-18 9:27 ` [PATCH 1/2] dt-bindings: mtd: Add realtek,rtl9301-ecc Markus Stockhausen
2025-08-18 9:27 ` Markus Stockhausen
2025-08-18 10:49 ` Rob Herring (Arm)
2025-08-18 10:49 ` Rob Herring (Arm)
2025-08-18 9:27 ` [PATCH 2/2] mtd: nand: realtek-ecc: Add Realtek external ECC engine support Markus Stockhausen
2025-08-18 9:27 ` Markus Stockhausen
2025-08-19 5:11 ` kernel test robot
2025-08-19 5:11 ` kernel test robot
2025-08-24 16:51 ` Miquel Raynal
2025-08-24 16:51 ` Miquel Raynal
2025-08-24 19:16 ` markus.stockhausen [this message]
2025-08-28 10:07 ` AW: " 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='015a01dc152b$9e90a990$dbb1fcb0$@gmx.de' \
--to=markus.stockhausen@gmx.de \
--cc=linux-mtd@lists.infradead.org \
--cc=miquel.raynal@bootlin.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 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.