cfi_cmdset_0001.c: do_write_buffer: wrong length

David Vrabel dv207 at hermes.cam.ac.uk
Tue Dec 19 04:41:15 EST 2000


On Mon, 18 Dec 2000, Shane Nay wrote:

> Okay, last message was way cryptic again..., I'm not a master communicator.  
> Anyway, I have succesfully tested the following change on two interleaves.  
> First device:
> two x16 devices in x8 mode interleaved
> Second device:
> one x16 device in x16 mode
> 
> It's only one change... cfi_cmdset_0001.c:
> /* Write length of data to come */
> -cfi_write(map,CMD((len/(cfi->device_type*CFIDEV_INTERLEAVE))-1),cmd_adr);
> +cfi_write(map,CMD((len/(cfi->device_type))-1),cmd_adr);

However this would break the case 1 in the table below.  Whereas 
    cfi_write(map, CMD(len/CFIDEV_BUSWIDTH-1), cmd_adr);
would work.

To add to the table...

device type  interleave  bus width  buf write len
2 (x16)      1           1 (x8)     len/1-1
2 (x16)      1           2 (x16)    len/2-1
2 (x16)      2           4 (x32)    len/4-1
2 (x16)      2           2 (x16)    len/2-1

It's still len/buswidth-1.

David Vrabel



To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org



More information about the linux-mtd mailing list