[U-Boot] [RFC] How to support the embedded flash in AT91SAM9XE series ?

Reinhard Meyer reinhard.meyer at emk-elektronik.de
Tue Jun 29 16:59:51 CEST 2010


Hi,

I want to add support for the embedded flash (128/256/512 kbytes) in 
those SoCs.

In short this flash has the following unique features:

1. memory mapped and read accessible like any NOR flash
2. at reset it can also be mapped to adress 0x0 (by setting a NV bit)
3. it has a pagesize of 512 bytes, only full pages can be rewritten with 
32 bit access
4. regions of 32 pages (hence 16 kbytes) can be locked (write protected)
5. the exact disposition (#pages, lock status etc) of the flash can be 
enquired
   at run time and hence should not be #defined at compile time

Feature 3 prevents a simple "cp" like command like for NOR flash unless 
the copy
command can be made to fail when it does not encompass full pages AND 
the copy
command can be made such that the copying to flash itself is done by a 
specialised function.

"protect on/off" could be made similiarly working, rounding up to full 
region sizes

a command to set/reset that NV bit should be added

Another possible solution would be to add a new command similiar to the 
"NAND"
command for write purposes, lock and NV bit.

Finally, u-boot itself, the environment and a possible backup should be 
able to be in that flash, too.

Any comments/suggestions on this?

Reinhard


More information about the U-Boot mailing list