Improper Command Sequence

David Woodhouse dwmw2 at infradead.org
Sat May 5 11:45:04 EDT 2001


nico at cam.org said:
>  ... and don't forget possible chip interleaves.

We currently deal with that to a certain extent, but not particularly 
nicely:
        if (status & CMD(0x3a)) {
                unsigned char chipstatus = status;
                if (status != CMD(status & 0xff)) {
                        int i = cfi->interleave;
                        for (i = 1; i<cfi->interleave; i++) {
                                      chipstatus |= status >> (cfi->device_type * 8);
                        }
                        printk(KERN_WARNING "Status is not identical for all chips: 0x%x. Merging to give 0x%02x\n", status, chipstatus);
                }

Actually I think the device_type there ought to be buswidth / interleave. 

--
dwmw2






More information about the linux-mtd mailing list