[U-Boot-Users] Flash configuration

Hello u all!
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... All is setup so that the processor starts to boot from 0xFFF00000 and the reset vector set to 0xFFF00100. Should I use the cfi_flash driver, provided by u-boot? Or should I write a flash.c in my board directory (this is done already)? Do I have to change anything when I use the driver?
Thanks in advance! Filipe

On Thu, 13 Oct 2005 16:27:20 +0100
Hello u all!
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... All is setup so that the processor starts to boot from 0xFFF00000 and the reset vector set to 0xFFF00100. Should I use the cfi_flash driver, provided by u-boot? Or should I write a flash.c in my board directory (this is done already)? Do I have to change anything when I use the driver?
CFG_FLASH_BASE is the address to which u-boot remaps the flash on CS0.
I assume that by "Linux Flash" you mean a Linux root file system on a seperate chip. If so then I think you need to map it (to a different CS) in u-boot/board/<yourboard>/flash.c. Then you can use the "bootcmd" variable to boot the kernel uImage from whereever in this chip it is.
The bootargs variable will tell the kernel where to find its root file system. You will have to write a mapping driver drivers/mtd/<yourboard>.c so that the kernel knows how to interpret this.
Alex
Thanks in advance! Filipe
This SF.Net email is sponsored by: Power Architecture Resource Center: Free content, downloads, discussions, and more. http://solutions.newsforge.com/ibmarch.tmpl _______________________________________________ U-Boot-Users mailing list U-Boot-Users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/u-boot-users

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
participants (3)
-
Alex Zeffertt
-
Jose França (Ext_GTBC)
-
Wolfgang Denk