From: Simon Glass Date: Sun, 26 Apr 2020 15:12:57 +0000 (-0600) Subject: board: Add a gd flag for chain loading X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=ba974a0137edc86cff9727a83cf6be154ab18ef0;p=u-boot.git board: Add a gd flag for chain loading When U-Boot is run from another boot loader, much of the low-level init needs to be skipped. Add a flag for this and adjust ll_boot_init() to use it. Signed-off-by: Simon Glass Reviewed-by: Peng Fan Reviewed-by: Bin Meng --- diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index d9e220cfe3..8c78792cc9 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -166,5 +166,6 @@ typedef struct global_data { #define GD_FLG_SPL_EARLY_INIT 0x04000 /* Early SPL init is done */ #define GD_FLG_LOG_READY 0x08000 /* Log system is ready for use */ #define GD_FLG_WDT_READY 0x10000 /* Watchdog is ready for use */ +#define GD_FLG_SKIP_LL_INIT 0x20000 /* Don't perform low-level init */ #endif /* __ASM_GENERIC_GBL_DATA_H */ diff --git a/include/init.h b/include/init.h index 9ef88c966b..b5a167b6ed 100644 --- a/include/init.h +++ b/include/init.h @@ -20,7 +20,7 @@ struct global_data; #ifdef CONFIG_EFI_STUB #define ll_boot_init() false #else -#define ll_boot_init() true +#define ll_boot_init() (!(gd->flags & GD_FLG_SKIP_LL_INIT)) #endif /*