[ECOS]AT91SAM7X - flash above 256k not supported

Andrew Lunn andrew@lunn.ch
Wed Apr 15 07:50:00 GMT 2009


On Wed, Apr 15, 2009 at 09:00:02AM +0200, Robert Brusa wrote:
> Hi
> Yesterday I realised, that the module at91_flash.c supports flash of the  
> AT91SAM7x-family processors only up to 256k. I definitely need more and  
> hence must add this new functionality to the existing code. Not an easy  
> task for me. Has anyone already done this? Or at least thought about it  
> and now has a few starting tips?

Yes, i thought about it, then ran away screaming :-(

When we wrote this driver, we never thought about having two flash
controllers. So lots of things are hard coded with the assumption
there is only one. There is also the issue that this driver needs to
work on the very small devices, 32K. I would not want to make the
driver much fatter in order to support big flashes.

One possible idea is to re-write the driver to use the flashv2 API.
Keep the code as it is, just supporting one flash controller, in a
lean and mean way.  Then take a copy of at91_flash.c as
at91_flash_mc2.c, s/AT91_MC_/AT91_MC2_/g and then add CDL so that if
you have one flash controller at91_flash.c is used, if you have two
flash controllers, at91_flash.c and at91_flash_mc2.c is used.

      Andrew


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list