All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chuanxiao.Dong" <chuanxiao.dong@intel.com>
To: linux-mtd@lists.infradead.org, dwmw2@infradead.org
Subject: [PATCH v2 1/6]nand/denali: optimize denali irq wait and irq handler functions
Date: Thu, 12 Aug 2010 18:51:08 +0800	[thread overview]
Message-ID: <20100812105108.GA11634@intel.com> (raw)

From f2e9d56b9d605dfbca3c703d9252d2b663e296e9 Mon Sep 17 00:00:00 2001
From: Chuanxiao Dong <chuanxiao.dong@intel.com>
Date: Thu, 12 Aug 2010 13:31:20 +0800
Subject: [PATCH 1/6] nand/denali: optimize denali irq wait and irq handler functions

Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
---
 drivers/mtd/nand/denali.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index 532fe07..dd32d04 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -660,6 +660,7 @@ static irqreturn_t denali_isr(int irq, void *dev_id)
 	uint32_t irq_status = 0x0;
 	irqreturn_t result = IRQ_NONE;
 
+	denali_set_intr_modes(denali, false);
 	spin_lock(&denali->irq_lock);
 
 	/* check to see if a valid NAND chip has
@@ -682,16 +683,16 @@ static irqreturn_t denali_isr(int irq, void *dev_id)
 			result = IRQ_HANDLED;
 		}
 	}
+
 	spin_unlock(&denali->irq_lock);
+	denali_set_intr_modes(denali, true);
 	return result;
 }
-#define BANK(x) ((x) << 24)
 
 static uint32_t wait_for_irq(struct denali_nand_info *denali, uint32_t irq_mask)
 {
 	unsigned long comp_res = 0;
 	uint32_t intr_status = 0;
-	bool retry = false;
 	unsigned long timeout = msecs_to_jiffies(1000);
 
 	do {
@@ -709,7 +710,6 @@ static uint32_t wait_for_irq(struct denali_nand_info *denali, uint32_t irq_mask)
 			/* these are not the interrupts you are looking for -
 			 * need to wait again */
 			spin_unlock_irq(&denali->irq_lock);
-			retry = true;
 		}
 	} while (comp_res != 0);
 
-- 
1.6.6.1

                 reply	other threads:[~2010-08-12 10:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20100812105108.GA11634@intel.com \
    --to=chuanxiao.dong@intel.com \
    --cc=dwmw2@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.