All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/8] Blackfin: nand: flush peripheral before polling it
Date: Mon, 6 Apr 2009 04:54:34 -0400	[thread overview]
Message-ID: <200904060454.35644.vapier@gentoo.org> (raw)
In-Reply-To: <20090406082710.8D3C8832E416@gemini.denx.de>

On Monday 06 April 2009 04:27:10 Wolfgang Denk wrote:
> In message Mike Frysinger wrote:
> > From: Graf Yang <graf.yang@analog.com>
> >
> > We need to make sure the data written to the nand flash controller makes
> > it there before we start polling its status register.  Otherwise, we may
> > get stale data and return before the controller is actually ready.
> >
> > Signed-off-by: Graf Yang <graf.yang@analog.com>
> > Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> > ---
> >  drivers/mtd/nand/bfin_nand.c |    1 +
> >  1 files changed, 1 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/mtd/nand/bfin_nand.c b/drivers/mtd/nand/bfin_nand.c
> > index f6a0835..f134ef1 100644
> > --- a/drivers/mtd/nand/bfin_nand.c
> > +++ b/drivers/mtd/nand/bfin_nand.c
> > @@ -98,6 +98,7 @@ static void bfin_nfc_read_buf(struct mtd_info *mtd,
> > uint8_t *buf, int len)
> >
> >  		/* Contents do not matter */
> >  		bfin_write_NFC_DATA_RD(0x0000);
> > +		SSYNC();
>
> Should such syncing not be integral part of the
> bfin_write_NFC_DATA_RD() aceessor?

on the Blackfin processor, the ssync instruction is a barrier rather than a 
hard requirement (well, that isnt 100% true, but those edge cases dont apply 
to peripherals).  since the NFC_DATA_RD MMR could be written in such a way to 
not need the barrier, we dont place ssync's into the MMR defines.  especially 
because the ssync instruction flushes all buffers in the chip, not just the 
peripherals, so it can be pretty heavy handed.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090406/83c303bd/attachment-0001.pgp 

  reply	other threads:[~2009-04-06  8:54 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-06  7:53 [U-Boot] [PATCH 0/8] Blackfin fixes for 2009.05 Mike Frysinger
2009-04-06  7:53 ` [U-Boot] [PATCH 1/8] Blackfin: spi: make cs deassert function deterministic Mike Frysinger
2009-04-06  8:29   ` Wolfgang Denk
2009-04-06  7:53 ` [U-Boot] [PATCH 2/8] Blackfin: nand: flush peripheral before polling it Mike Frysinger
2009-04-06  8:27   ` Wolfgang Denk
2009-04-06  8:54     ` Mike Frysinger [this message]
2009-04-06 20:12   ` Scott Wood
2009-04-06  7:53 ` [U-Boot] [PATCH 3/8] Blackfin: update anomaly sheets Mike Frysinger
2009-04-06  7:53 ` [U-Boot] [PATCH 4/8] Blackfin: add workaround for anomaly 05000171 Mike Frysinger
2009-04-06  7:53 ` [U-Boot] [PATCH 5/8] Blackfin: add workaround for anomaly 05000242 Mike Frysinger
2009-04-06  7:53 ` [U-Boot] [PATCH 6/8] Blackfin: add comment about anomaly 05000430 avoidance Mike Frysinger
2009-04-06  7:53 ` [U-Boot] [PATCH 7/8] Blackfin: add check for anomaly 05000362 Mike Frysinger
2009-04-06  7:53 ` [U-Boot] [PATCH 8/8] Blackfin: audit UART for all known anomalies Mike Frysinger
2009-04-06  8:07 ` [U-Boot] [PATCH 0/8] Blackfin fixes for 2009.05 Wolfgang Denk
2009-04-06  8:13   ` Mike Frysinger
2009-04-06  8:25     ` Wolfgang Denk

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=200904060454.35644.vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=u-boot@lists.denx.de \
    /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.