#include <api.h>
#include <bootstage.h>
#include <cpu_func.h>
+#include <cyclic.h>
+#include <display_options.h>
#include <exports.h>
+#ifdef CONFIG_MTD_NOR_FLASH
#include <flash.h>
+#endif
#include <hang.h>
#include <image.h>
#include <irq_func.h>
*/
gd->env_addr += gd->reloc_off;
#endif
-#ifdef CONFIG_OF_EMBED
/*
* The fdt_blob needs to be moved to new relocation address
* incase of FDT blob is embedded with in image
*/
- gd->fdt_blob += gd->reloc_off;
-#endif
+ if (CONFIG_IS_ENABLED(OF_EMBED) && CONFIG_IS_ENABLED(NEEDS_MANUAL_RELOC))
+ gd->fdt_blob += gd->reloc_off;
+
#ifdef CONFIG_EFI_LOADER
/*
* On the ARM architecture gd is mapped to a fixed register (r9 or x18).
{
int ret;
+ oftree_reset();
+
/* Save the pre-reloc driver model and start a new one */
gd->dm_root_f = gd->dm_root;
gd->dm_root = NULL;
/*
* Compute and print flash CRC if flashchecksum is set to 'y'
*
- * NOTE: Maybe we should add some WATCHDOG_RESET()? XXX
+ * NOTE: Maybe we should add some schedule()? XXX
*/
if (env_get_yesno("flashchecksum") == 1) {
- const uchar *flash_base = (const uchar *)CONFIG_SYS_FLASH_BASE;
+ const uchar *flash_base = (const uchar *)CFG_SYS_FLASH_BASE;
printf(" CRC: %08X", crc32(0,
flash_base,
putc('\n');
/* update start of FLASH memory */
-#ifdef CONFIG_SYS_FLASH_BASE
- bd->bi_flashstart = CONFIG_SYS_FLASH_BASE;
+#ifdef CFG_SYS_FLASH_BASE
+ bd->bi_flashstart = CFG_SYS_FLASH_BASE;
#endif
/* size of FLASH memory (final value) */
bd->bi_flashsize = flash_size;
#if defined(CONFIG_OXC) || defined(CONFIG_RMU)
/* flash mapped at end of memory map */
- bd->bi_flashoffset = CONFIG_SYS_TEXT_BASE + flash_size;
-#elif CONFIG_SYS_MONITOR_BASE == CONFIG_SYS_FLASH_BASE
+ bd->bi_flashoffset = CONFIG_TEXT_BASE + flash_size;
+#elif CONFIG_SYS_MONITOR_BASE == CFG_SYS_FLASH_BASE
bd->bi_flashoffset = monitor_flash_len; /* reserved area for monitor */
#endif
return 0;
#ifdef CONFIG_SANDBOX
sandbox_main_loop_init();
#endif
+
+ event_notify_null(EVT_MAIN_LOOP);
+
/* main_loop() can return to retry autoboot, if so just run it again */
for (;;)
main_loop();
/* initialize higher level parts of CPU like time base and timers */
cpu_init_r,
#endif
-#ifdef CONFIG_EFI_SETUP_EARLY
+#ifdef CONFIG_EFI_LOADER
efi_init_early,
#endif
#ifdef CONFIG_CMD_NAND