public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Alessandro Rubini <rubini-list@gnudd.com>
To: andrewm@isoar.ca
Cc: linux-mtd@lists.infradead.org
Subject: Re: Problem with Micron 256 MB NAND on 440EPx
Date: Mon, 26 May 2008 22:36:06 +0200	[thread overview]
Message-ID: <20080526203606.GA32041@mail.gnudd.com> (raw)
In-Reply-To: <483B132D.80103@isoar.ca>


> I've now verified with a logic analyzer that the NFREN strobe is active 
> during when NFRDYBSY is low (NAND chip is busy), and latching bogus data 
> as a result (the bus has pull-ups so 0xff).

I had a similar problem with the NDFC on an old kernel. I finally
tracked it down to a missing mb() (i.e. eieio on the ppc).  The
problem was triggered by DMA activity on the bus, but could also be
exposed by lowering NDFC speed.  The hw controller would thus check
the R/B* pin before the command reached the nand device, so it was not
busy (yet).  Since I was working with an old kernel and always tight
of time, I didn't check if the problem was still present in modern
code.

>From your description it looks like it's the same problem.
Back then, the fix was the following one on a 2.6.19.2 .

--- ./drivers/mtd/nand/ndfc.c	19 Mar 2007 09:53:08 -0000	1.1
+++ ./drivers/mtd/nand/ndfc.c	31 Aug 2007 15:40:48 -0000
@@ -76,6 +76,7 @@
 {
 	struct ndfc_controller *ndfc = &ndfc_ctrl;
 
+	wmb();
 	return __raw_readl(ndfc->ndfcbase + NDFC_STAT) & NDFC_STAT_IS_READY;
 }

Hope this helps
/alessandro

  reply	other threads:[~2008-05-26 20:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-17 18:39 Problem with Micron 256 MB NAND on 440EPx Andrew E. Mileski
2008-05-26 19:44 ` Andrew E. Mileski
2008-05-26 20:36   ` Alessandro Rubini [this message]
2008-05-26 23:04     ` Andrew E. Mileski

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=20080526203606.GA32041@mail.gnudd.com \
    --to=rubini-list@gnudd.com \
    --cc=andrewm@isoar.ca \
    --cc=linux-mtd@lists.infradead.org \
    /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