From: Eric Bénard Date: Thu, 10 Jun 2010 14:03:04 +0000 (+0200) Subject: mtd: mxc_nand: fix unbalanced enable for IRQ X-Git-Tag: v2.6.36-rc1~301^2~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a8cfcfb0de881735df4031eb5cc99be3d0971e9;p=profile%2Fivi%2Fkernel-x86-ivi.git mtd: mxc_nand: fix unbalanced enable for IRQ * 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 Signed-off-by: Artem Bityutskiy Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 68a7d37..b464f6b2 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: