
In message 004901c8b3a6$00a670b0$030514ac@atmel.com you wrote:
Let's keep in mind that the normal logic of the U-Boot startup sequence is like this:
- U-Boot boots and initializes the RAM
- U-Boot relocates itself into RAM, sets GD_FLG_RELOC and continues
running from RAM
- U-Boot continues with the initialization, for xample by setting up
the malloc arena, loading the working copy of the environment into RAM (after which it set's gd->env_valid), etc.
When you have a dataflash, this is not the normal behaviour.
Well, it is still the normal behaviour, except that booting from dataflash works differently, i. e. it is a special case.
A typical behaviour of an AT91 would be:
- BootROM copies initial bootloader (at91bootstrap/dataflashboot) to internal SRAM
- BootROM jumps to start of initial bootloader
- Initial bootloader does low-level init (including configuring the SDRAM controller)
- Initial bootloader copies U-Boot from dataflash to SDRAM
- Initial bootloader jumps to U-Boot
Yes, I am aware of this sequence. I wanted to explain that it is the responsibility of the running code to make sure that GD_FLG_RELOC is set before any of the "real" U-Boot code gets executed. It seems, this is missing in the case described here.
- U-Boot needs to skip low-level init
It may skip the normal low-level init sequence, but it still has to set up the same environment that normally is set up by that code.
Best regards,
Wolfgang Denk