From patchwork Thu Aug 20 12:57:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 31725 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by bilbo.ozlabs.org (Postfix) with ESMTPS id E043CB7087 for ; Thu, 20 Aug 2009 23:01:10 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1Me7DZ-0003mk-Ju; Thu, 20 Aug 2009 12:58:13 +0000 Received: from metis.ext.pengutronix.de ([2001:6f8:1178:4:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.69 #1 (Red Hat Linux)) id 1Me7DV-0002rq-SC for linux-mtd@lists.infradead.org; Thu, 20 Aug 2009 12:58:10 +0000 Received: from octopus.hi.pengutronix.de ([2001:6f8:1178:2:215:17ff:fe12:23b0]) by metis.ext.pengutronix.de with esmtp (Exim 4.63) (envelope-from ) id 1Me7Cy-0003ZC-F5; Thu, 20 Aug 2009 14:57:36 +0200 Received: from sha by octopus.hi.pengutronix.de with local (Exim 4.69) (envelope-from ) id 1Me7Cw-00025y-NS; Thu, 20 Aug 2009 14:57:34 +0200 Date: Thu, 20 Aug 2009 14:57:34 +0200 From: Sascha Hauer To: Linux MTD list Subject: MXC nand controller performance Message-ID: <20090820125734.GI23444@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline X-Sent-From: Pengutronix Entwicklungszentrum Nord - Hildesheim X-URL: http://www.pengutronix.de/ X-IRC: #ptxdist @freenode X-Accept-Language: de,en X-Accept-Content-Type: text/plain X-Impressum: Pengutronix - Linux Solutions for Science and Industry Handelsregister: Amtsgericht Hildesheim, HRA 2686 Peiner Strasse 6-8, 31137 Hildesheim, Germany Phone: +49-5121-206917-0 | Fax: +49-5121-206917-5555 Inhaber: Dipl.-Ing. Robert Schwebel X-Message-Flag: See Message Headers for Impressum X-Uptime: 14:49:46 up 15 days, 8 min, 30 users, load average: 18.04, 17.93, 14.56 User-Agent: Mutt/1.5.18 (2008-05-17) X-SA-Exim-Connect-IP: 2001:6f8:1178:2:215:17ff:fe12:23b0 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-mtd@lists.infradead.org X-Spam-Score: -0.0 (/) Cc: Vladimir Barinov , Magnus Lilja , Eric Benard , Daniel Mack , Alberto Panizzo X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hi, Hi recently found out that on my i.MX27 board the mxc nand controller performance nearly doubles when I disable interrupts. Can anybody confirm this behaviour, possibly on other i.MXs? I'm trying to figure out what to do. We could disable interrupts completely in which case the driver would become simpler. Maybe using polling mode has other impacts on other workloads, so maybe we want to add a flag to platform_data instead of disabling interrupts completely. You can use the following patch to disable interrupts. It is not meant for inclusion in this form of course. Sascha From ae3909b90667a13f7bbd6a042b6b65ea7c74ee48 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 20 Aug 2009 14:52:32 +0200 Subject: [PATCH] mxc_nand: disable interrupts Signed-off-by: Sascha Hauer --- drivers/mtd/nand/mxc_nand.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 76beea4..bcc5929 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -175,6 +175,8 @@ static void wait_op_done(struct mxc_nand_host *host, int max_retries, { uint32_t tmp; + useirq = 0; + if (useirq) { if ((readw(host->regs + NFC_CONFIG2) & NFC_INT) == 0) {