summaryrefslogtreecommitdiff
path: root/arch/x86
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-12-06 21:42:08 -0700
committerBin Meng <bmeng.cn@gmail.com>2019-12-15 11:44:14 +0800
commit0a0b09b47b2d3d492765a6436d7ad88a33c6744d (patch)
treec70696fe4f88c60fa01d372ca2a3c2f15a7661e7 /arch/x86
parent515e8174f5560d98c2f84999b2e5585c0f2ccd57 (diff)
x86: Add mrccache support for a 'variable' cache
Add support for a second cache type, for Apollo Lake. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/include/asm/mrccache.h1
-rw-r--r--arch/x86/lib/mrccache.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/include/asm/mrccache.h b/arch/x86/include/asm/mrccache.h
index b81e2b2fb6..0917cf2470 100644
--- a/arch/x86/include/asm/mrccache.h
+++ b/arch/x86/include/asm/mrccache.h
@@ -30,6 +30,7 @@ struct mrc_region {
/* Types of MRC data */
enum mrc_type_t {
MRC_TYPE_NORMAL,
+ MRC_TYPE_VAR,
MRC_TYPE_COUNT,
};
diff --git a/arch/x86/lib/mrccache.c b/arch/x86/lib/mrccache.c
index 1278737ce4..10949d249e 100644
--- a/arch/x86/lib/mrccache.c
+++ b/arch/x86/lib/mrccache.c
@@ -241,7 +241,8 @@ int mrccache_get_region(enum mrc_type_t type, struct udevice **devp,
}
/* Find the place where we put the MRC cache */
- mrc_node = dev_read_subnode(dev, "rw-mrc-cache");
+ mrc_node = dev_read_subnode(dev, type == MRC_TYPE_NORMAL ?
+ "rw-mrc-cache" : "rw-var-mrc-cache");
if (!ofnode_valid(mrc_node))
return log_msg_ret("Cannot find node", -EPERM);