MTD lock support for AMD_STD flash.
Pantelis Antoniou
panto at intracom.gr
Mon Sep 13 07:01:21 EDT 2004
Hi there
While trying to get MTD in 2.6 working in my board I stubbled on
this.
The lock/unlock logic does not seem to work for AMD STD jedec flashes.
> Oops: kernel access of bad area, sig: 11 [#1]
> NIP: C00F5354 LR: C00F5348 SP: C03FFDF0 REGS: c03ffd40 TRAP: 0300 Not tainted
> MSR: 00009032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> DAR: C4CD1002, DSISR: 00018C09
> TASK = c0341980[107] 'fw_saveenv' THREAD: c03fe000Last syscall: 54
> GPR00: 00000000 C03FFDF0 C0341980 00000014 C01D9C24 00000007 91FE2C56 00000000
> GPR08: C01D9C28 C5061000 C03ABF0C C03FFD20 00021555 20000900 03FCF500 03FCA31C
> GPR16: 007FFE30 03FCF478 03F7E438 7FFFFB00 00000000 C00F52D0 C03FFE68 C01A5E68
> GPR24: 00000000 C3FF4D90 C3FDEF20 C01A5E68 C03FFE68 00000000 C3FF4DC8 FFC70002
> NIP [c00f5354] do_xxlock_oneblock+0x84/0xbc
> LR [c00f5348] do_xxlock_oneblock+0x78/0xbc
> Call trace:
> [c00f4944] cfi_amdstd_varsize_frob+0x1c4/0x260
> [c00f5404] cfi_amdstd_unlock_varsize+0x34/0x44
> [c00ee09c] part_unlock+0x64/0x7c
> [c00f1140] mtd_ioctl+0x860/0xa14
> [c006235c] sys_ioctl+0x424/0x450
> [c00037b0] ret_from_syscall+0x0/0x44
> Kernel panic - not syncing: Aiee, killing interrupt handler!
> <0>Rebooting in 180 seconds..
This happens when trying to lock a block for MX29LV040C, and I think
will happen with all AMD STD flashes.
The thing is that these chips don't have support for locking, but I can't
find a way to declare it in the command set.
So the way to avoid this I set the lock & unlock methods in my map file.
This is a gross hack however and I'm wondering if there's an easier way...
Regards
Pantelis
More information about the linux-mtd
mailing list