[U-Boot-Users] [PATCH] use CFI-Flash and board depended driver together

Jens Scharsig esw at bus-elektronik.de
Thu Nov 30 15:52:43 CET 2006


Timur Tabi schrieb:

 >Ugh, I really dislike code like this.

I know,this code is dirty. But it's very simple and works for me.

> on these things, but I would rather you did something else.  For 
> instance, if CFG_FLASH_BOARD_DRIVER is not defined, then the cfi_xxx 
> functions are defined here.  Otherwise, they are declared as externs and 

No, if CFG_FLASH_BOARD_DRIVER is not defined cfi_xxx  functions are not 
defined in orginal cfi_flash.c. In this case all other uboot moduls can 
call functions under orginal names.

> You could do the same thing here.  Rename flash_get_size() to 
> cfi_flash_get_size() and treat it like the other cfi_xxx functions above.

A simple rename doesn't work.

flash_init calls board_flash_get_size
and
board_flash_getsize calls the orginal flash_get_size, if selected bank 
is suppored by cfi driver





More information about the U-Boot mailing list