mtd: nand: pxa3xx_nand: fix early spurious interrupt
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue Sep 1 14:59:05 PDT 2015
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=0b14392db2e998157d924085d7913e537ec26121
Commit: 0b14392db2e998157d924085d7913e537ec26121
Parent: bc3e00f04cc1fe033a289c2fc2e5c73c0168d360
Author: Robert Jarzmik <robert.jarzmik at free.fr>
AuthorDate: Wed Aug 19 20:30:14 2015 +0200
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Aug 19 15:25:19 2015 -0700
mtd: nand: pxa3xx_nand: fix early spurious interrupt
When the nand is first probe, and upon the first command start, the
status bits should be cleared before the interrupts are unmasked.
The bug is tricky : if the bootloader left a status bit set, the
unmasking of interrupts does trigger the interrupt handler before the
first command is issued, blocking the good behavior of the nand.
The same would happen if in pxa3xx_nand code flow a status bit is left,
and then a command is started.
Signed-off-by: Robert Jarzmik <robert.jarzmik at free.fr>
Acked-by: Ezequiel Garcia <ezequiel at vanguardiasur.com.ar>
Tested-by: Ezequiel Garcia <ezequiel at vanguardiasur.com.ar>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
drivers/mtd/nand/pxa3xx_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index baf3246..faf056b 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -442,8 +442,8 @@ static void pxa3xx_nand_start(struct pxa3xx_nand_info *info)
ndcr |= NDCR_ND_RUN;
/* clear status bits and run */
- nand_writel(info, NDCR, 0);
nand_writel(info, NDSR, NDSR_MASK);
+ nand_writel(info, NDCR, 0);
nand_writel(info, NDCR, ndcr);
}
More information about the linux-mtd-cvs
mailing list