From: Robert Jarzmik <robert.jarzmik@free.fr>
To: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>,
David Woodhouse <dwmw2@infradead.org>,
Brian Norris <computersforpeace@gmail.com>
Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org,
Robert Jarzmik <robert.jarzmik@free.fr>
Subject: [PATCH RESEND 1/2] mtd: nand: pxa3xx_nand: fix early spurious interrupt
Date: Wed, 19 Aug 2015 20:30:14 +0200 [thread overview]
Message-ID: <1440009015-3765-2-git-send-email-robert.jarzmik@free.fr> (raw)
In-Reply-To: <1440009015-3765-1-git-send-email-robert.jarzmik@free.fr>
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@free.fr>
---
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 1259cc558ce9..d1a4c336de1d 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -439,8 +439,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);
}
--
2.1.4
next prev parent reply other threads:[~2015-08-19 18:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-19 18:30 [PATCH RESEND 0/2] mtd: nand: pxa3xx-nand: fixes Robert Jarzmik
2015-08-19 18:30 ` Robert Jarzmik [this message]
2015-08-19 18:30 ` [PATCH RESEND 2/2] mtd: nand: pxa3xx-nand: fix random command timeouts Robert Jarzmik
2015-08-19 21:25 ` Ezequiel Garcia
2015-08-19 21:18 ` [PATCH RESEND 0/2] mtd: nand: pxa3xx-nand: fixes Ezequiel Garcia
2015-08-20 4:03 ` Brian Norris
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=1440009015-3765-2-git-send-email-robert.jarzmik@free.fr \
--to=robert.jarzmik@free.fr \
--cc=computersforpeace@gmail.com \
--cc=dwmw2@infradead.org \
--cc=ezequiel.garcia@free-electrons.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®