x86: Update mtrr functions to allow leaving cache alone
authorSimon Glass <sjg@chromium.org>
Mon, 1 Oct 2018 18:22:37 +0000 (12:22 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 9 Oct 2018 10:40:27 +0000 (04:40 -0600)
commit590cee8315e94e729493d2ecd8a604bcfbfa7d0e
tree2ac3eacb5e1a1274da1efd3fe34a893d8d978d65
parent6f1c0430e88396abc8e6a91ab3cc78882c76cb7c
x86: Update mtrr functions to allow leaving cache alone

At present the mtrr functions disable the cache before making changes and
enable it again afterwards. This is fine in U-Boot, but does not work if
running in CAR (such as we are in SPL).

Update the functions so that the caller can request that caches be left
alone.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
arch/x86/cpu/coreboot/coreboot.c
arch/x86/cpu/mtrr.c
arch/x86/include/asm/mtrr.h
cmd/x86/mtrr.c