Skip to content

Commit d5d27fd

Browse files
mergebbrezillon
authored andcommitted
mtd: rawnand: gpmi: fix MX28 bus master lockup problem
Disable BCH soft reset according to MX23 erratum #2847 ("BCH soft reset may cause bus master lock up") for MX28 too. It has the same problem. Observed problem: once per 100,000+ MX28 reboots NAND read failed on DMA timeout errors: [ 1.770823] UBI: attaching mtd3 to ubi0 [ 2.768088] gpmi_nand: DMA timeout, last DMA :1 [ 3.958087] gpmi_nand: BCH timeout, last DMA :1 [ 4.156033] gpmi_nand: Error in ECC-based read: -110 [ 4.161136] UBI warning: ubi_io_read: error -110 while reading 64 bytes from PEB 0:0, read only 0 bytes, retry [ 4.171283] step 1 error [ 4.173846] gpmi_nand: Chip: 0, Error -1 Without BCH soft reset we successfully executed 1,000,000 MX28 reboots. I have a quote from NXP regarding this problem, from July 18th 2016: "As the i.MX23 and i.MX28 are of the same generation, they share many characteristics. Unfortunately, also the erratas may be shared. In case of the documented erratas and the workarounds, you can also apply the workaround solution of one device on the other one. This have been reported, but I’m afraid that there are not an estimated date for updating the Errata documents. Please accept our apologies for any inconveniences this may cause." Fixes: 6f2a6a5 ("mtd: nand: gpmi: reset BCH earlier, too, to avoid NAND startup problems") Cc: stable@vger.kernel.org Signed-off-by: Manfred Schlaegl <manfred.schlaegl@ginzinger.com> Signed-off-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Fabio Estevam <festevam@gmail.com> Acked-by: Han Xu <han.xu@nxp.com> Signed-off-by: Boris Brezillon <bbrezillon@kernel.org>
1 parent ad46351 commit d5d27fd

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

drivers/mtd/nand/raw/gpmi-nand/gpmi-lib.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,10 @@ int gpmi_init(struct gpmi_nand_data *this)
155155

156156
/*
157157
* Reset BCH here, too. We got failures otherwise :(
158-
* See later BCH reset for explanation of MX23 handling
158+
* See later BCH reset for explanation of MX23 and MX28 handling
159159
*/
160-
ret = gpmi_reset_block(r->bch_regs, GPMI_IS_MX23(this));
160+
ret = gpmi_reset_block(r->bch_regs,
161+
GPMI_IS_MX23(this) || GPMI_IS_MX28(this));
161162
if (ret)
162163
goto err_out;
163164

@@ -263,12 +264,10 @@ int bch_set_geometry(struct gpmi_nand_data *this)
263264
/*
264265
* Due to erratum #2847 of the MX23, the BCH cannot be soft reset on this
265266
* chip, otherwise it will lock up. So we skip resetting BCH on the MX23.
266-
* On the other hand, the MX28 needs the reset, because one case has been
267-
* seen where the BCH produced ECC errors constantly after 10000
268-
* consecutive reboots. The latter case has not been seen on the MX23
269-
* yet, still we don't know if it could happen there as well.
267+
* and MX28.
270268
*/
271-
ret = gpmi_reset_block(r->bch_regs, GPMI_IS_MX23(this));
269+
ret = gpmi_reset_block(r->bch_regs,
270+
GPMI_IS_MX23(this) || GPMI_IS_MX28(this));
272271
if (ret)
273272
goto err_out;
274273

0 commit comments

Comments
 (0)