[<prev] [next>] [day] [month] [year] [list]
Message-ID: <MN2PR08MB5951CC96E757BB4A3549AE89B8140@MN2PR08MB5951.namprd08.prod.outlook.com>
Date: Mon, 3 Jun 2019 12:43:42 +0000
From: "Shivamurthy Shastri (sshivamurthy)" <sshivamurthy@...ron.com>
To: Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
David Woodhouse <dwmw2@...radead.org>,
Brian Norris <computersforpeace@...il.com>,
Marek Vasut <marek.vasut@...il.com>,
Vignesh Raghavendra <vigneshr@...com>,
Boris Brezillon <bbrezillon@...nel.org>,
Yixun Lan <yixun.lan@...ogic.com>,
Lucas Stach <dev@...xeye.de>,
Anders Roxell <anders.roxell@...aro.org>,
Stefan Agner <stefan@...er.ch>,
Marcel Ziswiler <marcel.ziswiler@...adex.com>,
"Bean Huo (beanhuo)" <beanhuo@...ron.com>,
Paul Cercueil <paul@...pouillou.net>,
Frieder Schrempf <frieder.schrempf@...tron.de>,
Chuanhong Guo <gch981213@...il.com>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH v3 11/12] mtd: spinand: micron: Fix read failure in Micron
M70A flashes
M70A series flashes by default enable continuous read feature (BIT0 in
configuration register). This feature will not expose the ECC to host
and causing read failure.
Signed-off-by: Shivamurthy Shastri <sshivamurthy@...ron.com>
---
drivers/mtd/nand/spi/micron.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/mtd/nand/spi/micron.c b/drivers/mtd/nand/spi/micron.c
index 6fde93ec23a1..1e28ea3d1362 100644
--- a/drivers/mtd/nand/spi/micron.c
+++ b/drivers/mtd/nand/spi/micron.c
@@ -127,6 +127,15 @@ static int micron_spinand_detect(struct spinand_device *spinand)
return 1;
}
+static int micron_spinand_init(struct spinand_device *spinand)
+{
+ /*
+ * Some of the Micron flashes enable this BIT by default,
+ * and there is a chance of read failure due to this.
+ */
+ return spinand_upd_cfg(spinand, CFG_QUAD_ENABLE, 0);
+}
+
static void micron_fixup_param_page(struct spinand_device *spinand,
struct nand_onfi_params *p)
{
@@ -150,6 +159,7 @@ static void micron_fixup_param_page(struct spinand_device *spinand,
static const struct spinand_manufacturer_ops micron_spinand_manuf_ops = {
.detect = micron_spinand_detect,
+ .init = micron_spinand_init,
.fixup_param_page = micron_fixup_param_page,
};
--
2.17.1
Powered by blists - more mailing lists