[PATCH v2 1/6]nand/denali: optimize denali irq wait and irq handler functions

Chuanxiao.Dong chuanxiao.dong at intel.com
Thu Aug 12 06:51:08 EDT 2010


From f2e9d56b9d605dfbca3c703d9252d2b663e296e9 Mon Sep 17 00:00:00 2001
From: Chuanxiao Dong <chuanxiao.dong at 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 at 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




More information about the linux-mtd mailing list