[U-Boot-Users] [PATCH] Complex MAPPING support on CFI driver

Rui Sousa rui.sousa at laposte.net
Wed May 23 17:33:18 CEST 2007


On Wednesday 23 May 2007 12:58, Rui Sousa wrote:
...
> My plan was:
> 1. Add a new CFG_FLASH_COMPLEX_MAPPING option to U-boot.
> 2. Create map structure to contain functions pointers to flash read/write
> functions.
> 3. Modify flash_info_t structure and add a pointer to map structure (if
> CFG_FLASH_COMPLEX_MAPPING is defined).
> 4. Add generic map_read(), map_write() functions to CFI driver.
> 5. Modify CFI driver to access flash using map_read()/map_write()
> functions. 6. If CFG_FLASH_COMPLEX_MAPPING is not defined the
> map_read()/map_write() are simple inline functions that access memory
> directly.
> 7. If CFG_FLASH_COMPLEX_MAPPING is defined it's up to the board specific
> code to initialize the map structure pointer in flash_info_t and the
> generic map_read()/map_write() functions will call
> board_map_read()/board_map_write() (through a function pointer).

Basic implementation attached:
1. Only write support is included.
2. Board code is responsible for defining board_map_xxx() functions.
3. No impact is expected if CFG_FLASH_COMPLEX_MAPPINGS is undefined.
4. flash_info_t isn't modified and no function pointers are used, the 
board_map_xxx() should use the absolut address or information on the info 
structure to determine which flash chip is being accessed.


Thanks,
Rui
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cfi.patch
Type: text/x-diff
Size: 14470 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070523/a9815ce0/attachment.patch 


More information about the U-Boot mailing list