From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Romain Izard <romain.izard.pro@gmail.com>
Cc: Yang Wenyou <Wenyou.Yang@atmel.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
linux-mtd <linux-mtd@lists.infradead.org>,
Ludovic Desroches <ludovic.desroches@microchip.com>,
Nicolas Ferre <nicolas.ferre@microchip.com>,
Alexandre Belloni <alexandre.belloni@free-electrons.com>
Subject: Re: Uncorrectable bitflips with Linux 4.12 on SAMA5D2
Date: Mon, 17 Jul 2017 19:48:09 +0200 [thread overview]
Message-ID: <20170717194809.4a080e0c@bbrezillon> (raw)
In-Reply-To: <CAMiSF3CtVY7G=ugt-bpsOOMqLcFrmx7hDstUag2_6H-KrN4yBg@mail.gmail.com>
+Ludovic, Nicolas and Alexandre
Hi Romain,
Le Mon, 17 Jul 2017 18:11:26 +0200,
Romain Izard <romain.izard.pro@gmail.com> a écrit :
> Hello,
>
> On a custom board based on Microchip's SAMA5D2 SoC, I am encountering
> ECC problems with the NAND Flash controller. The board is currently
> working with Linux v4.9.x, but it does not with Linux 4.12.
>
> Some pages on the NAND Flash memory chip of the device have bitflips.
> With Linux 4.9.x, the bitflips are fixed by the PMECC code, but with
> Linux 4.12, the errors are reported as uncorrectable.
>
> From my end, I updated the board's device tree to include the
> sama5d2.dtsi as it exists in Linux 4.12, but the rest of the file is
> the same as for Linux 4.9. From my understanding, it should be
> sufficient as the legacy DTB binding for the NAND controller is
> supported.
I know Ludovic add some problems with the NAND controller on sama5d2,
but it was with the new bindings (see the fixes here [1]).
Your problem seems a bit different since you're using the backward
compat code.
Could you dump PMECC/NFC regs when booting 4.9 and 4.12, and see if
there's a difference?
>
> The relevant extract is:
>
> nand0: nand@80000000 {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_nand_default>;
> status = "okay";
> nand-ecc-mode = "hw";
> atmel,pmecc-cap = <8>;
> atmel,pmecc-sector-size = <512>;
> /delete-property/ atmel,nand-has-dma;
> };
>
> The attached files show the same block read through nanddump, with
> Linux 4.9 and Linux 4.12
Yep, the dumps show 2 identical pages except for the bitflip in ECC
block 2, but I can't tell from this dump why PMECC fails to correct
bitflips.
Really sorry that you have to debug this problem, but I don't have a
sama5d2 platform with a NAND on it and couldn't test my
modification on this platform :-/.
Thanks,
Boris
[1]https://lkml.org/lkml/2017/7/11/95
next prev parent reply other threads:[~2017-07-17 17:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-17 16:11 Uncorrectable bitflips with Linux 4.12 on SAMA5D2 Romain Izard
2017-07-17 17:48 ` Boris Brezillon [this message]
2017-07-17 18:20 ` Boris Brezillon
2017-07-18 9:05 ` Romain Izard
2017-07-31 16:35 ` Boris Brezillon
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=20170717194809.4a080e0c@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=Wenyou.Yang@atmel.com \
--cc=alexandre.belloni@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=ludovic.desroches@microchip.com \
--cc=nicolas.ferre@microchip.com \
--cc=romain.izard.pro@gmail.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