Why CFI_DEVICETYPE_X8 in cfi_send_gen_cmd()?

David Woodhouse dwmw2 at infradead.org
Wed Feb 25 07:31:12 EST 2004

On Wed, 2004-02-25 at 11:08 +0000, David Vrabel wrote:
> Shawn Jin wrote:
> > 
> > In cfi_cmdset_0002.c, there is a piece of comment stating that the
> > CFI_DEVICETYPE_X8 is needed even when cfi->device_type !=
> > CFI_DEVICETYPE_X8. Why is it the case?

Because you're using it in this case to shift the unlock address. But
the unlock address was _already_ shifted, because of way the table in
jedec_probe.c works. It already gives you different unlock addresses
according to the device type, and they are _already_ shifted. You're
given a byte-address by the table and that's why you use it as one.

I suspect we could ditch the multiple entries in the table and revert to
using only one 'uaddr', and shifting it with the device type as you 
(er, he) suggest.


More information about the linux-mtd mailing list