Linux-mtd Archive on
 help / color / Atom feed
* [PATCH v1] mtd: rawnand: micron: don't error out if internal ECC is set
@ 2020-01-10 16:25 zdhays
  2020-01-16 18:22 ` Miquel Raynal
  0 siblings, 1 reply; 4+ messages in thread
From: zdhays @ 2020-01-10 16:25 UTC (permalink / raw)
  Cc: Vignesh Raghavendra, Boris Brezillon, Richard Weinberger, zhays,
	Zak Hays, Marco Felsch, Frieder Schrempf, linux-kernel,
	linux-mtd, Miquel Raynal, Thomas Gleixner, Piotr Sroka

From: Zak Hays <>

Recent changes to the driver require use of on-die correction if
the internal ECC enable bit is set. On some Micron parts, this bit
is enabled by default and there is no method for disabling it.

This is a false assumption though as that bit being enabled does not
necessarily mean that the on-die ECC *has* to be used. It has been
verified with a Micron FAE that other methods of error correction are
still valid even if this bit is set.

HW ECC offers generally higher performance than on-die so it is
preferred in some situations. This also allows multiple NAND parts to
be supported on the same PCB as some parts may not support on-die
error correction.

With that in mind, only throw a warning that the on-die bit is set
and allow the init to continue.

Signed-off-by: Zak Hays <>
 drivers/mtd/nand/raw/nand_micron.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/raw/nand_micron.c b/drivers/mtd/nand/raw/nand_micron.c
index 56654030ec7f..ec40c76443be 100644
--- a/drivers/mtd/nand/raw/nand_micron.c
+++ b/drivers/mtd/nand/raw/nand_micron.c
@@ -455,9 +455,7 @@ static int micron_nand_init(struct nand_chip *chip)
 	if (ondie == MICRON_ON_DIE_MANDATORY &&
 	    chip->ecc.mode != NAND_ECC_ON_DIE) {
-		pr_err("On-die ECC forcefully enabled, not supported\n");
-		ret = -EINVAL;
-		goto err_free_manuf_data;
+		pr_warn("WARNING: On-die ECC forcefully enabled, use caution with other methods\n");
 	if (chip->ecc.mode == NAND_ECC_ON_DIE) {

Linux MTD discussion mailing list

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-10 16:25 [PATCH v1] mtd: rawnand: micron: don't error out if internal ECC is set zdhays
2020-01-16 18:22 ` Miquel Raynal
2020-01-17  7:10   ` Marco Felsch
     [not found]     ` <>
2020-01-17 19:32       ` Zak Hays

Linux-mtd Archive on

Archives are clonable:
	git clone --mirror linux-mtd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mtd linux-mtd/ \
	public-inbox-index linux-mtd

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone