[U-Boot-Users] Flash initialization help

Hi All
I am relatively new to u-boot and need your help.
I have a few doubts regarding customization of U-boot, specifically the flash initialization
sequence.
Board config: MPC 8266 based custom board Boot Flash: AMD Flash Am29LV400BB70-EI (4 Mb) (U-boot will reside here) Main Flash: Intel StrataFlash TE28F256J3c-125 (32 Mb) U-boot 1.1.1
I have used the board/mpc8266ads.c, cpu/mpc8266ads.c and other related files as a base. I
plan to modify them and compile u-boot for my custom board.
Can I use strataFlash.c in ppmc8260? What changes are necessary to make it work with mpc8266
code base?
What are the other changes necessary to initialize 2 flashes?
Another doubt: Flash initialization lib_ppc/board.c/board_init_r()/flash_init() is done pretty late, after u-boot has relocated to RAM.
What is the objective of the initialization at such a late stage?
Regards, Nishant

In message 1098978366.c74c833cnishant.subs@myrealbox.com you wrote:
I have used the board/mpc8266ads.c, cpu/mpc8266ads.c and other related files as a base. I plan to modify them and compile u-boot for my custom board.
Can I use strataFlash.c in ppmc8260? What changes are necessary to make it work with mpc8266 code base?
No, you cannot, because there is no file with this name in the whole U-Boot tree.
Or do you mean board/ppmc8260/strataflash.c? That's different ('f' vs. 'F').
You can use that as a starting point.
What are the other changes necessary to initialize 2 flashes?
Obviously you need a driver that supports both types of flash chips, depending on which flash bank you are orking with.
Another doubt: Flash initialization lib_ppc/board.c/board_init_r()/flash_init() is done pretty late, after u-boot has relocated to RAM.
What is the objective of the initialization at such a late stage?
You cannot do it earlier, because then you are running code out of flash memory. It is impossible on most flash chips to read data and use any flash commands at the same time.
Best regards,
Wolfgang Denk
participants (2)
-
Nishant Galange
-
Wolfgang Denk