All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/6]nand/denali: optimize denali irq wait and irq handler functions
@ 2010-08-12 10:51 Chuanxiao.Dong
  0 siblings, 0 replies; only message in thread
From: Chuanxiao.Dong @ 2010-08-12 10:51 UTC (permalink / raw)
  To: linux-mtd, dwmw2

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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-08-12 10:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-12 10:51 [PATCH v2 1/6]nand/denali: optimize denali irq wait and irq handler functions Chuanxiao.Dong

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.