This is the mail archive of the ecos-devel@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: New Flash-Driver for singleChipDevice


On Thu, Dec 15, 2005 at 01:38:51AM +0100, oliver munz @ s p e a g wrote:
> Hello
> 
> I'm writing an flash-driver for the Atmel AT91SAM7S Family. I found no 
> usefull documentaion about the functions, that I should implement.
> 
> My device is totaly different to the 29Fblabla and so on Series... The 
> memory-layout is very simple.
> 
> Is it correct, that I only need to implement:
> 
> flash_program_buf(); as an funcion for copy n words from somere to the 
> flash,
> flash_erase_block(); as an empty function (flash_program_buf(); will do all 
> nessesary erasing).

No, This should do what it says, ie erase the
block. flash_program_buf() should not perform an erase. It is legal to
write to a block that is not erased. 

> flash_query(); as an empty function, there is no flash-device whit vendor 
> codes...

Don't the different members of the AT91SAMxxx have different amounts
of flash? So you should query the register which contains this
information and return it.

> flash_hwr_init(); as empty function, there is nothing to do.

You should look at the information returned by flash_query and decide
on how big the flash is. You also need to fill in the block size and
the number of blocks. 

> flash_hwr_map_error();
> flash_code_overlaps(); as copy from a nother flash_driver...

You can copy flash_code_overlaps() but i expect the AT91 returns
different err codes than a typical Strata device. So you will probably
need to modify this flash_hwr_map_error.
 
> It is possible that this is all it needs? Or have I handle some other 
> things, like the size of the flash-area or the segmentation?
> 
> Currently the flash_program_buf(); function does all the work and eCos 
> don't need to know something about the flash-segmentation and so on...

This will cause problems for RedBoot and jffs2. It wants to know this
information so it can lay out it structures correctly. 

There is some documentation in the flashv2 branch. Attached is the
sgml file.


        Andrew

Attachment: flash.sgml
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]