x86: spl: Avoid using init_cache_f_r() from SPL
authorSimon Glass <sjg@chromium.org>
Thu, 4 May 2023 22:50:57 +0000 (16:50 -0600)
committerBin Meng <bmeng@tinylab.org>
Thu, 11 May 2023 02:25:29 +0000 (10:25 +0800)
commit80831b2a42cfe9bd3306059a818b8bc2b42a02d8
tree0124aff4dc25a5b68c3a684cccc0567ab469ab28
parent4e7cbf746f6ed1353244773b47aa1c7f92ed9d97
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>
arch/x86/lib/spl.c