linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/7] mtd: Blackfin NFC: fix nand busy detection
@ 2010-08-05 15:07 Mike Frysinger
  2010-08-05 15:07 ` [PATCH 2/7] mtd: Blackfin NFC: delete useless comment about jffs2 Mike Frysinger
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Mike Frysinger @ 2010-08-05 15:07 UTC (permalink / raw)
  To: linux-mtd, David Woodhouse; +Cc: uclinux-dist-devel, Barry Song

From: Barry Song <barry.song@analog.com>

The IRQSTAT register is a W1C register used by the interrupt handler and
may have its BUSY bit changed.  This makes it somewhat unreliable for the
polling devready function.  So switch it over to use the BUSY bit in the
STAT register that always reflects the current state of the hardware.

This fixes driver hangs seen when the NAND flash is under heavy system
load (like I/O benchmarks).

Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/mtd/nand/bf5xx_nand.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c
index 2974995..f3e3e74 100644
--- a/drivers/mtd/nand/bf5xx_nand.c
+++ b/drivers/mtd/nand/bf5xx_nand.c
@@ -218,9 +218,9 @@ static void bf5xx_nand_hwcontrol(struct mtd_info *mtd, int cmd,
  */
 static int bf5xx_nand_devready(struct mtd_info *mtd)
 {
-	unsigned short val = bfin_read_NFC_IRQSTAT();
+	unsigned short val = bfin_read_NFC_STAT();
 
-	if ((val & NBUSYIRQ) == NBUSYIRQ)
+	if ((val & NBUSY) == NBUSY)
 		return 1;
 	else
 		return 0;
-- 
1.7.2

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-08-16  3:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-05 15:07 [PATCH 1/7] mtd: Blackfin NFC: fix nand busy detection Mike Frysinger
2010-08-05 15:07 ` [PATCH 2/7] mtd: Blackfin NFC: delete useless comment about jffs2 Mike Frysinger
2010-08-05 15:07 ` [PATCH 3/7] mtd: Blackfin NFC: fix typo for read/write delay setup Mike Frysinger
2010-08-05 15:07 ` [PATCH 4/7] mtd: Blackfin NFC: wait for the ECC reset to finish Mike Frysinger
2010-08-05 15:16   ` David Woodhouse
2010-08-05 15:20     ` [Uclinux-dist-devel] " Mike Frysinger
2010-08-16  2:54     ` Barry Song
2010-08-16  3:31       ` Mike Frysinger
2010-08-05 15:07 ` [PATCH 5/7] mtd: Blackfin NFC: make sure to check NAND_ALE in cmd_ctrl Mike Frysinger
2010-08-05 15:07 ` [PATCH 6/7] mtd: Blackfin NFC: fix handling of page sizes Mike Frysinger
2010-08-05 15:07 ` [PATCH 7/7] mtd: Blackfin NFC: fix raw page write/read handling Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).