From: Marek Vasut <marex@denx.de>
To: Graham Moore <ggrahammoore@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@linux-m68k.org>,
Insop Song <insop.song@gainspeed.com>,
"grmoore@altera.com" <grmoore@altera.com>,
Gerhard Sittig <gsi@denx.de>, Jingoo Han <jg1.han@samsung.com>,
linux-kernel@vger.kernel.org,
Yves Vandervennet <rocket.yvanderv@gmail.com>,
linux-mtd@lists.infradead.org,
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
Alan Tull <atull@altera.com>,
Sourav Poddar <sourav.poddar@ti.com>,
Brian Norris <computersforpeace@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Dinh Nguyen <dinguyen@altera.com>
Subject: Re: [PATCH] Add support for flag status register on Micron chips
Date: Wed, 9 Apr 2014 20:31:20 +0200 [thread overview]
Message-ID: <201404092031.20439.marex@denx.de> (raw)
In-Reply-To: <CA+iBjpSRftzK+eQEqtxEr+t7YNgZneB=WyJHhOkVA8Rd4SPiPg@mail.gmail.com>
On Wednesday, April 09, 2014 at 08:14:49 PM, Graham Moore wrote:
> On Wed, Apr 9, 2014 at 6:09 AM, Gerhard Sittig <gsi@denx.de> wrote:
> > On Wed, 2014-04-09 at 12:03 +0200, Marek Vasut wrote:
> >> On Tuesday, April 08, 2014 at 06:12:49 PM, grmoore@altera.com wrote:
> >> > From: Graham Moore <grmoore@altera.com>
> >> >
> >> > This is a slightly different version of the patch that Insop Song
> >> > submitted
> >> > (http://marc.info/?i=201403012022.10111.marex%20()%20denx%20!%20de).
> >> >
> >> > I talked to Insop, and he agreed I should submit this patch as a
> >> > follow-on to his.
> >> >
> >> > This patch uses a flag in the m25p_ids[] array to determine which
> >> > chips need to use the FSR (Flag Status Register).
> >> >
> >> > Rationale for using the FSR:
> >> >
> >> > The Micron data sheets say we have to do this, at least for the
> >> > multi-die 512M and 1G parts (n25q512 and n25q00). In practice, if we
> >> > don't check the FSR for program/erase status, and we rely solely on
> >> > the status register (SR), then we get corrupted data in the flash.
>
> [...]
>
> >> > Micron told us (Altera) that for multi-die chips based on the 65nm
> >> > 256MB die, we need to check the SR first, then check the FSR, which
> >> > is why the wait_for_fsr_ready function does that. Future chips based
> >> > on 45 nm 512MB die will use the FSR only.
> >
> > This sounds to me similar to polling the NAND's R/B pin until the
> > operation has completed, to then fetch the STATUS byte to
> > determine the execution's result. Does this sound plausible?
> > For NOR, do you poll for the "busy" condition to deassert, and
> > check for success then?
>
> Sounds plausible to me. We poll the SR until not busy, then poll the
> FSR until it's not busy. Success is when FSR busy is deasserted
> within the timeout.
>
> Micron said we have to read the FSR "at least once", so we don't
> read it once for every die or anything like that. I ran a quick
> test, and for both the 2-die and 4-die parts, the FSR shows not busy
> on the first read after SR not busy.
I'd love to know how this FSR-not-busy is exactly related to SR-not-busy, but I
guess only Micron can tell :-/
Best regards,
Marek Vasut
WARNING: multiple messages have this Message-ID (diff)
From: Marek Vasut <marex@denx.de>
To: Graham Moore <ggrahammoore@gmail.com>
Cc: Gerhard Sittig <gsi@denx.de>,
"grmoore@altera.com" <grmoore@altera.com>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>,
Artem Bityutskiy <artem.bityutskiy@linux.intel.com>,
Sourav Poddar <sourav.poddar@ti.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Geert Uytterhoeven <geert+renesas@linux-m68k.org>,
Jingoo Han <jg1.han@samsung.com>,
Insop Song <insop.song@gainspeed.com>,
linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
Alan Tull <atull@altera.com>, Dinh Nguyen <dinguyen@altera.com>,
Yves Vandervennet <rocket.yvanderv@gmail.com>
Subject: Re: [PATCH] Add support for flag status register on Micron chips
Date: Wed, 9 Apr 2014 20:31:20 +0200 [thread overview]
Message-ID: <201404092031.20439.marex@denx.de> (raw)
In-Reply-To: <CA+iBjpSRftzK+eQEqtxEr+t7YNgZneB=WyJHhOkVA8Rd4SPiPg@mail.gmail.com>
On Wednesday, April 09, 2014 at 08:14:49 PM, Graham Moore wrote:
> On Wed, Apr 9, 2014 at 6:09 AM, Gerhard Sittig <gsi@denx.de> wrote:
> > On Wed, 2014-04-09 at 12:03 +0200, Marek Vasut wrote:
> >> On Tuesday, April 08, 2014 at 06:12:49 PM, grmoore@altera.com wrote:
> >> > From: Graham Moore <grmoore@altera.com>
> >> >
> >> > This is a slightly different version of the patch that Insop Song
> >> > submitted
> >> > (http://marc.info/?i=201403012022.10111.marex%20()%20denx%20!%20de).
> >> >
> >> > I talked to Insop, and he agreed I should submit this patch as a
> >> > follow-on to his.
> >> >
> >> > This patch uses a flag in the m25p_ids[] array to determine which
> >> > chips need to use the FSR (Flag Status Register).
> >> >
> >> > Rationale for using the FSR:
> >> >
> >> > The Micron data sheets say we have to do this, at least for the
> >> > multi-die 512M and 1G parts (n25q512 and n25q00). In practice, if we
> >> > don't check the FSR for program/erase status, and we rely solely on
> >> > the status register (SR), then we get corrupted data in the flash.
>
> [...]
>
> >> > Micron told us (Altera) that for multi-die chips based on the 65nm
> >> > 256MB die, we need to check the SR first, then check the FSR, which
> >> > is why the wait_for_fsr_ready function does that. Future chips based
> >> > on 45 nm 512MB die will use the FSR only.
> >
> > This sounds to me similar to polling the NAND's R/B pin until the
> > operation has completed, to then fetch the STATUS byte to
> > determine the execution's result. Does this sound plausible?
> > For NOR, do you poll for the "busy" condition to deassert, and
> > check for success then?
>
> Sounds plausible to me. We poll the SR until not busy, then poll the
> FSR until it's not busy. Success is when FSR busy is deasserted
> within the timeout.
>
> Micron said we have to read the FSR "at least once", so we don't
> read it once for every die or anything like that. I ran a quick
> test, and for both the 2-die and 4-die parts, the FSR shows not busy
> on the first read after SR not busy.
I'd love to know how this FSR-not-busy is exactly related to SR-not-busy, but I
guess only Micron can tell :-/
Best regards,
Marek Vasut
next prev parent reply other threads:[~2014-04-09 21:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-08 16:12 [PATCH] Add support for flag status register on Micron chips grmoore
2014-04-08 16:12 ` grmoore
2014-04-08 16:12 ` grmoore
2014-04-08 16:12 ` grmoore
2014-04-08 16:52 ` Insop Song
2014-04-08 16:52 ` Insop Song
2014-04-09 10:06 ` Marek Vasut
2014-04-09 10:06 ` Marek Vasut
2014-04-09 10:16 ` Jingoo Han
2014-04-09 10:16 ` Jingoo Han
2014-04-09 10:21 ` Jingoo Han
2014-04-09 10:21 ` Jingoo Han
2014-04-09 10:03 ` Marek Vasut
2014-04-09 10:03 ` Marek Vasut
2014-04-09 11:09 ` Gerhard Sittig
2014-04-09 11:09 ` Gerhard Sittig
2014-04-09 18:14 ` Graham Moore
2014-04-09 18:14 ` Graham Moore
2014-04-09 18:31 ` Marek Vasut [this message]
2014-04-09 18:31 ` Marek Vasut
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=201404092031.20439.marex@denx.de \
--to=marex@denx.de \
--cc=artem.bityutskiy@linux.intel.com \
--cc=atull@altera.com \
--cc=computersforpeace@gmail.com \
--cc=dinguyen@altera.com \
--cc=dwmw2@infradead.org \
--cc=geert+renesas@linux-m68k.org \
--cc=ggrahammoore@gmail.com \
--cc=grmoore@altera.com \
--cc=gsi@denx.de \
--cc=insop.song@gainspeed.com \
--cc=jg1.han@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=rocket.yvanderv@gmail.com \
--cc=s.hauer@pengutronix.de \
--cc=sourav.poddar@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.