[U-Boot-Users] Can U-boot support CFI and None CFI devices on the same board
rui.sousa at laposte.net
Mon Nov 27 23:44:07 CET 2006
On Thursday 23 November 2006 14:42, Yotam Admon wrote:
> I use U-Boot (1.1.4) and try to work with AM29LV040B (AMD None CFI
> Flash) in addition to known CFI flash devices (AMD, Intel, MXIC, SST).
> Does anyone have a way to integrate the CFI deriver with none CFI
What I did in our local U-boot version was(*):
1. Add a cfi_ prefix to flash functions in drivers/cfi_flash.c:
flash_init --> cfi_flash_init
flash_erase --> cfi_flash_erase
2. Change flash base address table, in drivers/cfi_flash.c also:
flash_info_t flash_info --> extern flash_info_t flash_info
3. Create in our board specific directory a flash.c file with all the flash
interface functions and the declaration of flash_info:
4. From my flash_init() I call cfi_flash_init() first. This will change the
flash_id for all CFI compatible flashes in the flash_info table.
5. For all other flash types I use my own flash driver(s).
6. flash_erase(), for example, then looks like this:
if (info->flash_id == FLASH_MAN_CFI)
return cfi_flash_erase(info, s_first, s_last);
/ * call my flash driver specific flash_erase */
I hope the helps you,
*) I don't see a way for this to be merged into U-boot any time soon since it
implies changes for all boards using the CFI driver.
More information about the U-Boot