From: Miquel Raynal <miquel.raynal@bootlin.com>
To: Richard Weinberger <richard@nod.at>
Cc: Bert Vermeulen <bert@biot.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Patrice Chotard <patrice.chotard@foss.st.com>,
Boris Brezillon <boris.brezillon@collabora.com>,
Christophe Kerello <christophe.kerello@foss.st.com>,
Mark Brown <broonie@kernel.org>,
Alexander Lobakin <alobakin@pm.me>,
linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org
Subject: Re: [PATCH v2] mtd: spinand: Add support for Etron EM73D044VCx
Date: Tue, 14 Sep 2021 19:31:08 +0200 [thread overview]
Message-ID: <20210914193108.78df5367@xps13> (raw)
In-Reply-To: <20210908201624.237634-1-bert@biot.com>
Hi Bert,
Richard, a question for you below!
bert@biot.com wrote on Wed, 8 Sep 2021 22:16:19 +0200:
> This adds a new vendor Etron, and support for a 2Gb chip.
>
> The datasheet is available at
> https://www.etron.com/cn/products/EM73%5B8%5DC%5BD_E_F%5DVC%20SPI%20NAND%20Flash_Promotion_Rev%201_00A.pdf
>
> Signed-off-by: Bert Vermeulen <bert@biot.com>
> ---
> v2:
> - Made ooblayout_free/_ecc depend on chip-specific parameters, instead of
> hardcoded to this 2Gb chip only
> - Fixed manufacturer ordering
> - Fixed minor formatting issues as reported
> - Removed debug comment
>
> drivers/mtd/nand/spi/Makefile | 2 +-
> drivers/mtd/nand/spi/core.c | 1 +
> drivers/mtd/nand/spi/etron.c | 104 ++++++++++++++++++++++++++++++++++
> include/linux/mtd/spinand.h | 1 +
> 4 files changed, 107 insertions(+), 1 deletion(-)
> create mode 100644 drivers/mtd/nand/spi/etron.c
[...]
> +static int etron_ecc_get_status(struct spinand_device *spinand, u8 status)
> +{
> + switch (status & STATUS_ECC_MASK) {
> + case STATUS_ECC_NO_BITFLIPS:
> + return 0;
> +
> + case STATUS_ECC_HAS_BITFLIPS:
> + /* Between 1-7 bitflips were corrected */
> + return 7;
Mmmh this is a bit problematic, having no intermediate value means a
single bitflip will trigger UBI to move the data around as its
threshold will be reached. Richard, any feedback on this?
> +
> + case STATUS_ECC_MASK:
> + /* Maximum bitflips were corrected */
> + return 8;
> +
> + case STATUS_ECC_UNCOR_ERROR:
> + return -EBADMSG;
> + }
> +
> + return -EINVAL;
> +}
Thanks,
Miquèl
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
next prev parent reply other threads:[~2021-09-14 17:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-08 20:16 [PATCH v2] mtd: spinand: Add support for Etron EM73D044VCx Bert Vermeulen
2021-09-14 17:31 ` Miquel Raynal [this message]
2021-09-14 17:49 ` Richard Weinberger
2021-09-14 20:03 ` Bert Vermeulen
2021-09-15 7:13 ` Miquel Raynal
2021-09-15 8:13 ` Frieder Schrempf
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=20210914193108.78df5367@xps13 \
--to=miquel.raynal@bootlin.com \
--cc=alobakin@pm.me \
--cc=bert@biot.com \
--cc=boris.brezillon@collabora.com \
--cc=broonie@kernel.org \
--cc=christophe.kerello@foss.st.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=patrice.chotard@foss.st.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