From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: "Bean Huo (beanhuo)" <beanhuo@micron.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"pawel.moll@arm.com" <pawel.moll@arm.com>,
Campbell <ijc+devicetree@hellion.org.uk>,
"richard@nod.at" <richard@nod.at>,
"Mark Rutland" <mark.rutland@arm.com>,
"marek.vasut@gmail.com" <marek.vasut@gmail.com>,
Rob Herring <robh+dt@kernel.org>,
"linux-mtd@lists.infradead.org" <linux-mtd@lists.infradead.org>,
"galak@codeaurora.org" <galak@codeaurora.org>,
Cyrille Pitchen <cyrille.pitchen@atmel.com>,
"computersforpeace@gmail.com" <computersforpeace@gmail.com>
Subject: Re: [PATCH 4/5] mtd: nand: add support for Micron on-die ECC
Date: Tue, 11 Apr 2017 17:30:51 +0200 [thread overview]
Message-ID: <20170411173051.7aafb717@bbrezillon> (raw)
In-Reply-To: <90300f14cd2a4ae6967d8be0f7dff4e9@SIWEX5A.sing.micron.com>
On Tue, 11 Apr 2017 15:02:22 +0000
"Bean Huo (beanhuo)" <beanhuo@micron.com> wrote:
> Hi, Boris and Thomas
> Let me do some explanation.
>
> >> if (NAND == SLC ) { // on-die ECC only exists in SLC //check device ID
> >> byte 4
> >> if ((ID.byte4 & 0x02) == 0x02) {// internal ECC level ==10b
> >
> >So here the MT29F1G08ABADAWP datasheet says 0x2 <=> 4bit/512bytes ECC.
> >
>
> If the NAND supports on-die ECC, here should be 10b, not matter it is 8bit or 4bit,
> You are correct, MT29F1G08ABADAWP is 0x2, its explanation is 4bit/512bytes ECC.
> But for the 70s, it is 8bit on-die ECC, but it is still 10b.
> So that why here using these two bits to determine if exist on-die ECC.
> What's more, for some old products, they don't support on-die ECC,
> Sometimes, here is still 01b, so still need following codes to do further
> determinations.
Okay, then here is the differentiator. Did you check that on SLC NANDs
there's no collision on ID[4].bits[1:0]. I've seen NAND vendors
changing their ID scheme in incompatible ways (old fields were
replaced by new ones with completely different meanings).
I'd really like to make sure we're not mis-interpreting READ_ID
information, so maybe we should restrict the test on ONFI NANDs if all
NANDs supporting on-die ECC are ONFI compliant. We should probably also
check that chip->id.len >= 5.
>
> >> if (ID.byte4 & 0x80) {//on-Die ECC enabled
> >
> >Did you read my last reply?
> >Thomas discovered that ID[4].bit7 is actually reflecting the ECC engine state (1 if
> >the engine is enabled, 0 if it's disabled), not whether the NAND supports on-die
> >ECC or not, so no this test is not reliable.
> >
> For the on-die ECC, it is not always default enabled. It depends on requirement from costumers.
> If on-die ECC is not enabled, bit7 is 0. It can be switched through "Feature Operations".
So this check is not needed, right?
BTW, do you have NANDs where the on-die ECC is always enabled, and if
this is the case, what happens when you call
SET_FEATURE(disable/enable-ECC) on these NANDs?
>
> >> if (ONFI.byte112 == 4)
> >> 60s SLC NAND with on-die ECC
> >> else if (ONFI.byte112 == 8)
> >> 70s SLC NAND with on-die ECC
> >
> >This is completely fucked up! Now the ONFI param page says the NAND requires
> >8bits/512bytes, while the ID bytes advertised an on-die ECC providing
> >4bits/512bytes correctability.
>
> I think, my previous answers can answer this confusion.
Yep. BTW, sorry for being so harsh in my previous reply.
next prev parent reply other threads:[~2017-04-11 15:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <538805ebf8e64015a8b833de755652b3@SIWEX5A.sing.micron.com>
2017-03-22 13:20 ` [PATCH 4/5] mtd: nand: add support for Micron on-die ECC Bean Huo (beanhuo)
2017-03-22 13:45 ` Boris Brezillon
2017-03-22 14:01 ` Arnaud Mouiche
2017-03-22 14:39 ` Bean Huo (beanhuo)
2017-03-22 14:52 ` Boris Brezillon
2017-03-22 17:11 ` Bean Huo (beanhuo)
2017-04-03 11:31 ` Bean Huo (beanhuo)
2017-04-11 12:51 ` Boris Brezillon
2017-04-11 14:26 ` Bean Huo (beanhuo)
2017-04-11 14:49 ` Boris Brezillon
2017-04-11 15:10 ` Boris Brezillon
2017-04-11 15:28 ` Bean Huo (beanhuo)
2017-04-11 15:02 ` Bean Huo (beanhuo)
2017-04-11 15:30 ` Boris Brezillon [this message]
2017-04-11 17:01 ` Bean Huo (beanhuo)
2017-04-12 7:03 ` Boris Brezillon
2017-04-13 14:08 ` Bean Huo (beanhuo)
2017-03-21 10:38 [PATCH 0/5] mtd: nand: add support for " Thomas Petazzoni
2017-03-21 10:38 ` [PATCH 4/5] mtd: nand: add support for Micron " Thomas Petazzoni
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=20170411173051.7aafb717@bbrezillon \
--to=boris.brezillon@free-electrons.com \
--cc=beanhuo@micron.com \
--cc=computersforpeace@gmail.com \
--cc=cyrille.pitchen@atmel.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-mtd@lists.infradead.org \
--cc=marek.vasut@gmail.com \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@free-electrons.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