summaryrefslogtreecommitdiff
path: root/arch/x86/lib
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-04-26 18:12:55 +0300
committerBin Meng <bmeng.cn@gmail.com>2020-04-30 12:40:16 +0300
commit526aabec2496834450f9dab06e4f62bdc0696d33 (patch)
tree6eb8b75543577367bd753b10f2aac6b48c11286e /arch/x86/lib
parent52b9beb5276def9e261ded543e9f4ff9940a064e (diff)
downloadu-boot-526aabec2496834450f9dab06e4f62bdc0696d33.tar.xz
x86: cpu: Skip init code when chain loading
When U-Boot is not the first-stage bootloader the interrupt and cache init must be skipped, as well as init for various peripherals. Update the code to add checks for this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86/lib')
-rw-r--r--arch/x86/lib/init_helpers.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/lib/init_helpers.c b/arch/x86/lib/init_helpers.c
index 5bb55e256f..d906b528b3 100644
--- a/arch/x86/lib/init_helpers.c
+++ b/arch/x86/lib/init_helpers.c
@@ -30,6 +30,9 @@ int init_cache_f_r(void)
return ret;
}
+ if (!ll_boot_init())
+ return 0;
+
/* Initialise the CPU cache(s) */
return init_cache();
}