
In message 6DABE12DF62766479F2A94F7E3157C5F9B2890@lisi053a.siemens.pt you wrote:
I'm configuring u-boot (for the first time) so that i can have 2 flash eprom chips, in two different banks, for a mpc8272 based board. They are organized the following way:
BOOT Flash -> starts at 0xFFF00000 and has 512KB of size. (read-only) Linux Flash -> starts at 0x50000000 and has 64MB of size. (CFI
compatible)
Since CFG_FLASH_BASE is used throughout the u-boot code as a reference, which one should it be? The boot flash address or the linux flash address? I'm really confused here...
FLASH_BASE is closely related to the location of U-Boot in flash, so it has to be set to match the start address of your "boot flash".
Should I use the cfi_flash driver, provided by u-boot? Or should I
This is mostly a mtter of taste, and how you design your system.
Some configurations handle the "boot flash" as "ROM" (your use of "read only" above seems to indicate such intentions, too), and they configure U-Boot such that it is not even included in the "flinfo" display and thus cannot be written by standard U-Boot commands.
Others expose all flash banks to the user, which is IMHO the better approach - sooner or later you *will* want to update the U-Boot image in your "boot flash" and you will execrate the idiot who disabled write access to this chip. Probably rather sooner than later. Also, the boot flash is probably an excellent location to store U-Boot's environment sectors without creating gaps or reserved areas in your "Linux flash".
If you want to use the CFI driver or your own is also mostly a matter of taste - and code size requirements.
Best regards,
Wolfgang Denk