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>
diff --git a/arch/x86/include/asm/mrccache.h b/arch/x86/include/asm/mrccache.h
index b81e2b2..0917cf2 100644
--- a/arch/x86/include/asm/mrccache.h
+++ b/arch/x86/include/asm/mrccache.h
@@ -30,6 +30,7 @@
/* 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 1278737..10949d2 100644
--- a/arch/x86/lib/mrccache.c
+++ b/arch/x86/lib/mrccache.c
@@ -241,7 +241,8 @@
}
/* 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);