* The fdt_blob needs to be moved to new relocation address
* incase of FDT blob is embedded with in image
*/
- if (CONFIG_IS_ENABLED(OF_EMBED) && CONFIG_IS_ENABLED(NEEDS_MANUAL_RELOC))
+ if (IS_ENABLED(CONFIG_OF_EMBED) && IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC))
gd->fdt_blob += gd->reloc_off;
#ifdef CONFIG_EFI_LOADER
* 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_TEXT_BASE + flash_size;
-#elif CONFIG_SYS_MONITOR_BASE == CONFIG_SYS_FLASH_BASE
+#elif CONFIG_SYS_MONITOR_BASE == CFG_SYS_FLASH_BASE
bd->bi_flashoffset = monitor_flash_len; /* reserved area for monitor */
#endif
return 0;
env_set_hex("fdtcontroladdr",
(unsigned long)map_to_sysmem(gd->fdt_blob));
- #if (CONFIG_IS_ENABLED(SAVE_PREV_BL_INITRAMFS_START_ADDR) || \
- CONFIG_IS_ENABLED(SAVE_PREV_BL_FDT_ADDR))
+ #if (IS_ENABLED(CONFIG_SAVE_PREV_BL_INITRAMFS_START_ADDR) || \
+ IS_ENABLED(CONFIG_SAVE_PREV_BL_FDT_ADDR))
save_prev_bl_data();
#endif
}
#endif
-#if defined(CONFIG_PRAM)
+#if defined(CFG_PRAM)
/*
* Export available size of memory for Linux, taking into account the
* protected RAM at top of memory
ulong pram = 0;
char memsz[32];
- pram = env_get_ulong("pram", 10, CONFIG_PRAM);
+ pram = env_get_ulong("pram", 10, CFG_PRAM);
sprintf(memsz, "%ldk", (long int)((gd->ram_size / 1024) - pram));
env_set("mem", memsz);
printf("Warning: Unexpected devicetree source (not from a prior stage)");
printf("Warning: U-Boot may not function properly\n");
}
+ if (IS_ENABLED(CONFIG_OF_TAG_MIGRATE) &&
+ (gd->flags & GD_FLG_OF_TAG_MIGRATE))
+ /*
+ * U-Boot will silently fail to work after 2023.07 if
+ * there are old tags present
+ */
+ printf("Warning: Device tree includes old 'u-boot,dm-' tags: please fix by 2023.07!\n");
}
return 0;
*/
#endif
initr_reloc_global_data,
-#if CONFIG_IS_ENABLED(NEEDS_MANUAL_RELOC) && CONFIG_IS_ENABLED(EVENT)
+#if IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC) && CONFIG_IS_ENABLED(EVENT)
event_manual_reloc,
#endif
#if defined(CONFIG_SYS_INIT_RAM_LOCK) && defined(CONFIG_E500)
/* 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
initr_status_led,
#endif
/* PPC has a udelay(20) here dating from 2002. Why? */
-#if defined(CONFIG_GPIO_HOG)
- gpio_hog_probe_all,
-#endif
#ifdef CONFIG_BOARD_LATE_INIT
board_late_init,
#endif
*/
last_stage_init,
#endif
-#if defined(CONFIG_PRAM)
+#if defined(CFG_PRAM)
initr_mem,
#endif
run_main_loop,
void board_init_r(gd_t *new_gd, ulong dest_addr)
{
/*
+ * The pre-relocation drivers may be using memory that has now gone
+ * away. Mark serial as unavailable - this will fall back to the debug
+ * UART if available.
+ *
+ * Do the same with log drivers since the memory may not be available.
+ */
+ gd->flags &= ~(GD_FLG_SERIAL_READY | GD_FLG_LOG_READY);
+
+ /*
* Set up the new global data pointer. So far only x86 does this
* here.
* TODO(sjg@chromium.org): Consider doing this for all archs, or