public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* MTD driver for Atmel serial flash
@ 2001-10-26 12:56 Derek Mulcahy
  2001-10-26 13:37 ` David Woodhouse
  0 siblings, 1 reply; 2+ messages in thread
From: Derek Mulcahy @ 2001-10-26 12:56 UTC (permalink / raw)
  To: linux-mtd

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: MTD driver for Atmel serial flash
  2001-10-26 12:56 MTD driver for Atmel serial flash Derek Mulcahy
@ 2001-10-26 13:37 ` David Woodhouse
  0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2001-10-26 13:37 UTC (permalink / raw)
  To: Derek Mulcahy; +Cc: linux-mtd

derek@technicaltoys.net said:
>  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. 

Hmmm. Very little code is prepared to deal with erase blocks with a size 
that isn't a power of two. The best way forward is probably to pretend to 
be normal NOR flash with a larger erase size. 

--
dwmw2

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-10-26 13:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-26 12:56 MTD driver for Atmel serial flash Derek Mulcahy
2001-10-26 13:37 ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox