From patchwork Thu Jun 10 14:03:04 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Benard X-Patchwork-Id: 55223 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 ozlabs.org (Postfix) with ESMTPS id 52C97B7D95 for ; Fri, 11 Jun 2010 00:04:36 +1000 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1OMiLm-0006wl-AX; Thu, 10 Jun 2010 14:03:18 +0000 Received: from smtp2-g21.free.fr ([212.27.42.2]) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1OMiLj-0006tJ-0b for linux-mtd@lists.infradead.org; Thu, 10 Jun 2010 14:03:17 +0000 Received: from localhost.localdomain (pac33-2-82-240-38-71.fbx.proxad.net [82.240.38.71]) by smtp2-g21.free.fr (Postfix) with ESMTP id 3CFEE4B011B; Thu, 10 Jun 2010 16:03:06 +0200 (CEST) From: =?utf-8?q?Eric=20B=C3=A9nard?= To: linux-mtd@lists.infradead.org Subject: [PATCH 1/2] mxc_nand: fix Unbalanced enable for IRQ Date: Thu, 10 Jun 2010 16:03:04 +0200 Message-Id: <1276178584-10074-1-git-send-email-eric@eukrea.com> X-Mailer: git-send-email 1.6.3.3 MIME-Version: 1.0 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20100610_100315_554985_5D8CE450 X-CRM114-Status: GOOD ( 11.98 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, low trust [212.27.42.2 listed in list.dnswl.org] Cc: s.hauer@pengutronix.de, ivo.clarysse@gmail.com, linux-arm-kernel@lists.arm.linux.org.uk, u.kleine-koenig@pengutronix.de 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 * preset should be done before sending the reset command * without this, I get the following error on an i.MX35 : [ 0.900000] ------------[ cut here ]------------ [ 0.900000] WARNING: at kernel/irq/manage.c:290 __enable_irq+0x4c/0x88() [ 0.900000] Unbalanced enable for IRQ 33 [ 0.900000] Modules linked in: [ 0.900000] [] (unwind_backtrace+0x0/0xf0) from [] (dump_stack+0x18/0x1c) [ 0.900000] [] (dump_stack+0x18/0x1c) from [] (warn_slowpath_common+0x54/0x6c) [ 0.900000] [] (warn_slowpath_common+0x54/0x6c) from [] (warn_slowpath_fmt+0x38/0x40) [ 0.900000] [] (warn_slowpath_fmt+0x38/0x40) from [] (__enable_irq+0x4c/0x88) [ 0.900000] [] (__enable_irq+0x4c/0x88) from [] (enable_irq+0x54/0x98) [ 0.900000] [] (enable_irq+0x54/0x98) from [] (wait_op_done+0x40/0x134) [ 0.900000] [] (wait_op_done+0x40/0x134) from [] (send_cmd+0x30/0x38) [ 0.900000] [] (send_cmd+0x30/0x38) from [] (mxc_nand_command+0x26c/0x328) [ 0.900000] [] (mxc_nand_command+0x26c/0x328) from [] (nand_scan_ident+0x188/0x6c0) [ 0.900000] [] (nand_scan_ident+0x188/0x6c0) from [] (mxcnd_probe+0x2b8/0x3d0) [ 0.900000] [] (mxcnd_probe+0x2b8/0x3d0) from [] (platform_drv_probe+0x20/0x24) [ 0.900000] [] (platform_drv_probe+0x20/0x24) from [] (driver_probe_device+0xb0/0x164) [ 0.900000] [] (driver_probe_device+0xb0/0x164) from [] (__driver_attach+0x68/0x8c) [ 0.900000] [] (__driver_attach+0x68/0x8c) from [] (bus_for_each_dev+0x50/0x84) [ 0.900000] [] (bus_for_each_dev+0x50/0x84) from [] (driver_attach+0x20/0x28) [ 0.900000] [] (driver_attach+0x20/0x28) from [] (bus_add_driver+0x144/0x2dc) [ 0.900000] [] (bus_add_driver+0x144/0x2dc) from [] (driver_register+0xb0/0x13c) [ 0.900000] [] (driver_register+0xb0/0x13c) from [] (platform_driver_register+0x4c/0x60) [ 0.900000] [] (platform_driver_register+0x4c/0x60) from [] (platform_driver_probe+0x20/0xa0) [ 0.900000] [] (platform_driver_probe+0x20/0xa0) from [] (mxc_nd_init+0x18/0x24) [ 0.900000] [] (mxc_nd_init+0x18/0x24) from [] (do_one_initcall+0x64/0x1bc) [ 0.900000] [] (do_one_initcall+0x64/0x1bc) from [] (kernel_init+0xe8/0x1ac) [ 0.900000] [] (kernel_init+0xe8/0x1ac) from [] (kernel_thread_exit+0x0/0x8) [ 0.900000] ---[ end trace 8bf72ac6ba089a19 ]--- [ 1.140000] NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron NAND 256MiB 3,3V 8-bit) Signed-off-by: Eric BĂ©nard --- drivers/mtd/nand/mxc_nand.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 82e9438..8878503 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -604,8 +604,8 @@ static void mxc_nand_command(struct mtd_info *mtd, unsigned command, /* Command pre-processing step */ switch (command) { case NAND_CMD_RESET: - send_cmd(host, command, false); preset(mtd); + send_cmd(host, command, false); break; case NAND_CMD_STATUS: