(No Subject)
David Woodhouse
dwmw2 at infradead.org
Wed Apr 25 06:26:59 EDT 2001
mkomiya at crossnet.co.jp said:
> Our hardware has one flash memory in 16bit mode. CPU is SH4 of
> Hitachi. That is 32bit type CPU and can connect the device in 16bit
> mode. In this case, interleave is 1 and bus width is 2.
> Before using cfi->device_type instead of CFI_DEVICETYPE_X8 MTD driver
> cannot calculate the address of the CFI command correctly.
Which CFI command is being sent to the wrong address? The unlock commands?
The cfi_cmdset_0002 code passes CFI_DEVICETYPE_X8 to the cfi_send_gen_cmd
function when doing the unlock cycles, instead of cfi->device_type, because
the unlock addresses (cfi->addr_unlock[12]) are supposed to have been
pre-calculated so they don't need shifting.
I think that cfi_probe.c calculates the correct addresses for 8-bit chips
and for 16-bit chips in 8-bit mode. I suspect that we may be calculating
the wrong unlock addresses for 16-bit chips which are actually in 16-bit
mode.
Your patch changes 8-bit devices to use (0xaaa,0x555) and changes _all_
16-bit devices to use (0x555,0x2aa). I suspect that you should be changing
only the 16-bit devices _in 16-bit mode_ to use 0x555, 0x2aa, while leaving
the 16-bit devices in 8-bit mode as they were.
--
dwmw2
To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org
More information about the linux-mtd
mailing list