This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: AT91SAM7X - flash above 256k not supported
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Robert Brusa <bob dot brusa at gmail dot com>
- Cc: MailingList: ecos-discuss <ecos-discuss at ecos dot sourceware dot org>;
- Date: Wed, 15 Apr 2009 09:45:39 +0200
- Subject: Re: [ECOS]AT91SAM7X - flash above 256k not supported
- References: <op.use1p9xwkeg3uf@localhost>
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