]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: Add a gd flag for chain loading
authorSimon Glass <sjg@chromium.org>
Sun, 26 Apr 2020 15:12:57 +0000 (09:12 -0600)
committerBin Meng <bmeng.cn@gmail.com>
Thu, 30 Apr 2020 09:40:16 +0000 (17:40 +0800)
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 <sjg@chromium.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
include/asm-generic/global_data.h
include/init.h

index d9e220cfe3582eaf2bca571495cb7dd3ac0d13ba..8c78792cc98bf4d27f5668981857cf8d68fca3e4 100644 (file)
@@ -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 */
index 9ef88c966bef025992e6265ce9feccd7c467a671..b5a167b6edb0194a08b1de235d3f970a5bb4e013 100644 (file)
@@ -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
 
 /*