From: john.ogness@linutronix.de (John Ogness)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] mtd: mxc_nand fixups
Date: Fri, 18 Jun 2010 19:01:34 +0200 [thread overview]
Message-ID: <804oh0b7gx.fsf@merkur.tec.linutronix.de> (raw)
This patch reverts the driver to enabling/disabling the NFC interrupt
mask rather than enabling/disabling the system interrupt. This cleans
up the driver so that it doesn't rely on interrupts being disabled
within the interrupt handler.
The patch is against linux-next 20100618.
Signed-off-by: John Ogness <john.ogness@linutronix.de>
---
drivers/mtd/nand/mxc_nand.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
Index: linux-next-20100618/drivers/mtd/nand/mxc_nand.c
===================================================================
--- linux-next-20100618.orig/drivers/mtd/nand/mxc_nand.c
+++ linux-next-20100618/drivers/mtd/nand/mxc_nand.c
@@ -173,8 +173,11 @@ static const char *part_probes[] = { "Re
static irqreturn_t mxc_nfc_irq(int irq, void *dev_id)
{
struct mxc_nand_host *host = dev_id;
+ uint16_t tmp;
- disable_irq_nosync(irq);
+ tmp = readw(host->regs + NFC_CONFIG1);
+ tmp |= NFC_INT_MSK; /* disable NFC interrupts */
+ writew(tmp, host->regs + NFC_CONFIG1);
wake_up(&host->irq_waitq);
@@ -192,7 +195,9 @@ static void wait_op_done(struct mxc_nand
if (useirq) {
if ((readw(host->regs + NFC_CONFIG2) & NFC_INT) == 0) {
- enable_irq(host->irq);
+ tmp = readw(host->regs + NFC_CONFIG1);
+ tmp &= ~NFC_INT_MSK; /* enable NFC interrupts */
+ writew(tmp, host->regs + NFC_CONFIG1);
wait_event(host->irq_waitq,
readw(host->regs + NFC_CONFIG2) & NFC_INT);
@@ -846,7 +851,7 @@ static int __init mxcnd_probe(struct pla
host->irq = platform_get_irq(pdev, 0);
- err = request_irq(host->irq, mxc_nfc_irq, IRQF_DISABLED, DRIVER_NAME, host);
+ err = request_irq(host->irq, mxc_nfc_irq, 0, DRIVER_NAME, host);
if (err)
goto eirq;
next reply other threads:[~2010-06-18 17:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-18 17:01 John Ogness [this message]
2010-06-18 20:54 ` [PATCH 4/5] mtd: mxc_nand fixups Sascha Hauer
2010-06-19 20:25 ` John Ogness
2010-06-20 9:09 ` Ivo Clarysse
2010-06-20 9:21 ` [PATCHv2 " John Ogness
2010-06-21 11:47 ` Ivo Clarysse
2010-06-22 15:54 ` [PATCHv3 " John Ogness
2010-06-23 7:34 ` Ivo Clarysse
2010-06-23 8:48 ` John Ogness
2010-06-23 9:23 ` Ivo Clarysse
2010-06-23 10:10 ` John Ogness
2010-06-24 7:27 ` Sascha Hauer
2010-06-24 10:16 ` John Ogness
2010-06-25 14:50 ` Ivo Clarysse
2010-06-26 9:17 ` John Ogness
2010-07-01 14:24 ` Ivo Clarysse
2010-06-25 14:46 ` Ivo Clarysse
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=804oh0b7gx.fsf@merkur.tec.linutronix.de \
--to=john.ogness@linutronix.de \
--cc=linux-arm-kernel@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