summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-05-05 01:50:57 +0300
committerBin Meng <bmeng@tinylab.org>2023-05-11 05:25:29 +0300
commit80831b2a42cfe9bd3306059a818b8bc2b42a02d8 (patch)
tree0124aff4dc25a5b68c3a684cccc0567ab469ab28
parent4e7cbf746f6ed1353244773b47aa1c7f92ed9d97 (diff)
downloadu-boot-80831b2a42cfe9bd3306059a818b8bc2b42a02d8.tar.xz
x86: spl: Avoid using init_cache_f_r() from SPL
This function is used by U-Boot proper. It does not set up MTRRs when SPL is enabled, but we do want this done when it is called from SPL. In fact it is confusing to use the same function from SPL, since there are quite a few conditions there. All init_cache_f_r() really does is commit the MTRRs and set up the cache. Do this in the SPL's version of this function instead. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
-rw-r--r--arch/x86/lib/spl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/x86/lib/spl.c b/arch/x86/lib/spl.c
index 479889aec6..61eb026c86 100644
--- a/arch/x86/lib/spl.c
+++ b/arch/x86/lib/spl.c
@@ -186,7 +186,8 @@ void board_init_f(ulong flags)
void board_init_f_r(void)
{
- init_cache_f_r();
+ mtrr_commit(false);
+ init_cache();
gd->flags &= ~GD_FLG_SERIAL_READY;
debug("cache status %d\n", dcache_status());
board_init_r(gd, 0);