MTD driver for Atmel serial flash

Derek Mulcahy derek at technicaltoys.net
Fri Oct 26 08:56:41 EDT 2001


Hi

I am developing an MTD driver for an Atmel serial flash.

The device has 264 byte pages and they can be erased and written 
individually.

I'm not sure what values to put in the mtd_info structure. I intend this 
to be used with JFFS2.

Currently I have

    mtd->name = "atmel";
    mtd->type = MTD_OTHER;
    mtd->flags = MTD_WRITEB_WRITEABLE | MTD_ERASEABLE | MTD_CLEAR_BITS | 
MTD_SET_BITS;
    mtd->size = 256 * 2048;
    mtd->read = serial_read;
    mtd->write = serial_write;
    mtd->sync = serial_sync;
    mtd->erase = serial_erase;
    mtd->erasesize = 256;

As you can see, I am hiding the extra 8 bytes per page from the MTD 
system, this makes the read/writes simpler.

An advice/pointers on the right way to do this would be much appreciated.

Cheers

Derek





More information about the linux-mtd mailing list