Imprecise data abort with i.MX31 NAND controller
Dear linux-mtd list,
I'm trying to get Linux (I'm using 2.6.38.2, but could go with another version if that helps) running on a customer's i.MX31 board.
The NAND is a 8-Gbit, 2112-Byte/page x8 chip identified as:
Manufacturer ID: 0x20, Chip ID: 0xd3 (ST Micro NAND 1GiB 3,3V 8-bit)
The NAND works fine at first, a ptxdist-built rootfs gets mounted, system boots till prompt, but when the jffs2 garbage collector kicks in, the nfc driver fails with an imprecise data abort.
I've tracked it down to the first nand_do_write_oob which in turn calls mxc_nand_command() with PAGEPROG for the first time. Everything looks good, but in send_cmd_v1_v2 I get an imprecise data abort after the write to CONFIG2 with NFC_CMD set. I'm pretty sure the (imprecise) abort is due to the CONFIG2 write because I've inserted some delay loops and it always fails at the same point - without the delay loops it would fail in wait_op_done or some other function down the callstack.
The NAND can be read and written from U-Boot (2011.03-rc1) just fine, and the JFFS2 filesystem image that I've flashed using U-Boot works within linux if mounted read-only.
I've attached a logfile that shows the last output up to the crash.
I'd appreciate if anyone could tell me if the driver from 2.6.38.2 is supposed to work with an i.MX31, or for any pointers about how to further debug this problem.
Best Regards,
Dominic
...mxc_nand_command (cmd = 0x0, col = 0x0, page = 0x2d7e) send_cmd(host, 0x0, 0)send_addr(host, 0x0 0)send_addr(host, 0x0 0)send_addr(host, 0x7e 0)send_addr(host, 0x2d 0)send_addr(host, 0x0 1)send_cmd(host, 0x30, 1)mxc_nand_command (cmd = 0x0, col = 0x0, page = 0x2d7f) send_cmd(host, 0x0, 0)send_addr(host, 0x0 0)send_addr(host, 0x0 0)send_addr(host, 0x7f 0)send_addr(host, 0x2d 0)send_addr(host, 0x0 1)send_cmd(host, 0x30, 1)nand_do_write_oob: to = 0x016a0000, len = 8 mxc_nand_command (cmd = 0xff, col = 0xffffffff, page = 0xffffffff) send_cmd(host, 0xff, 0)mxc_nand_command (cmd = 0x70, col = 0xffffffff, page = 0xffffffff) send_cmd(host, 0x70, 1)mxc_nand_command (cmd = 0x80, col = 0x800, page = 0x2d40) mxc_nand_command (cmd = 0x0, col = 0x0, page = 0x2d40) send_cmd(host, 0x0, 0)send_addr(host, 0x0 0)send_addr(host, 0x0 0)send_addr(host, 0x40 0)send_addr(host, 0x2d 0)send_addr(host, 0x0 1)send_cmd(host, 0x30, 1)send_cmd(host, 0x80, 0)send_addr(host, 0x0 0)send_addr(host, 0x0 0)send_addr(host, 0x40 0)send_addr(host, 0x2d 0)send_addr(host, 0x0 1)mxc_nand_command (cmd = 0x10, col = 0xffffffff, page = 0xffffffff) send_cmd(host, 0x10, 1)
Unhandled fault: imprecise external abort (0x406) at 0x00000000
Internal error: : 406 [#1] PREEMPT last sysfs file: /sys/kernel/uevent_seqnum Modules linked in: CPU: 0 Not tainted (2.6.38.2 #21) PC is at wait_op_done+0x0/0x94 LR is at mxc_nand_command+0x1f8/0x210 pc : [<c01b847c>] lr : [<c01b8b40>] psr: 60000013
sp : c7999d58 ip : 00000000 fp : 00000000
r10: 00000000 r9 : 016a0000 r8 : ffffffff
r7 : ffffffff r6 : 00000010 r5 : c7978000 r4 : c7978000 r3 : c8864e00 r2 : 00000001 r1 : 00000001 r0 : c7978000
Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 00c5387d Table: 87aa8000 DAC: 00000017 Process jffs2_gcd_mtd0 (pid: 176, stack limit = 0xc7998268)
Stack: (0xc7999d58 to 0xc799a000)
9d40: c7978238 c7978000
9d60: c7974c80 00000040 c7978000 016a0000 00000027 c01b23a0 c01b234c 00002d40 9d80: 00000000 c7978238 c7999e10 c01b34f8 00000008 0000000b 00000027 00000000 9da0: 00000000 016a0000 00000000 c7978000 c7999e10 c79e6df8 c88bf4d0 00000000 9dc0: c797e000 c01b476c c7999e10 c01b46cc 016a0000 00000000 00000000 00000000 9de0: c79e6d60 c01aad44 c7999e10 c01aacc0 016a0000 c79e6c00 c88bf4c4 016a0000 9e00: c79e6d60 c01288b0 c7999e10 c79e6c00 00000001 00000000 00000000 00000008 9e20: 00000000 00000000 00000000 c028e78c c88bf4c4 c79e6c00 c88bf4c4 c0124f84 9e40: 00001000 c7999e74 c797e000 60000013 00000000 c79e6d38 00000001 c79e6d60 9e60: 00000000 c005f578 00000000 00000000 c0123b5c 00001000 c797e000 00000000 9e80: c79e6c6c c79e6c00 c79e6dd8 00000000 c7998000 c79e6c6c c7999f00 c79e6d60 9ea0: 00000000 c0123d40 00000000 c005f578 00000080 00000000 c003b8ac 00000000 9ec0: c78985a4 00000000 00000001 00000001 c7999ee4 c0036358 c78985a4 c79e6c00 9ee0: c79e6d60 c7999fb4 c7998000 00000001 c7999f00 00000000 00000000 c012559c 9f00: c0021920 c781e000 00000002 00000000 00000000 00000000 00000000 c7998000 9f20: 00000000 60000093 c7998000 00000000 c037ff20 00000000 c7999fa4 c005f578 9f40: 00000080 00000000 c78c9800 c0375900 fa371a61 00000054 c78c9830 c0375900 9f60: 00000001 00000001 c7999f7c c0036358 c78c9800 c0375900 c7999fa4 c027f9d4 9f80: 00000002 c781fdec c79e6c00 c7999fb4 c0125430 00000000 00000000 00000000 9fa0: 00000000 c0051800 00000000 00000000 c79e6c00 00000000 00000001 dead4ead 9fc0: ffffffff ffffffff c0399424 00000000 00000000 c0320455 c7999fd8 c7999fd8 9fe0: 00000000 c781fdec c005177c c00276c8 00000013 c00276c8 00000000 00000000 [<c01b847c>] (wait_op_done+0x0/0x94) from [<00000040>] (0x40)
Code: e2800004 ebf9e6f8 e3a00001 e8bd8010 (e3510000) ---[ end trace b8075d71dc530e26 ]---