[v6,035/102] x86: Add mrccache support for a 'variable' cache
diff mbox series

Message ID 20191206213936.v6.35.I2740ad290fe58e0b8a6874f37320f069978b62e1@changeid
State Accepted
Delegated to: Bin Meng
Headers show
Series
  • x86: Add initial support for apollolake
Related show

Commit Message

Simon Glass Dec. 7, 2019, 4:42 a.m. UTC
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>
---

Changes in v6: None
Changes in v5: None
Changes in v4:
- apollolake -> Apollo Lake

Changes in v3:
- Move the mrccache_get_region() change into this patch

Changes in v2: None

 arch/x86/include/asm/mrccache.h | 1 +
 arch/x86/lib/mrccache.c         | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Bin Meng Dec. 8, 2019, 3:02 a.m. UTC | #1
On Sat, Dec 7, 2019 at 12:48 PM Simon Glass <sjg@chromium.org> wrote:
>
> 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>
> ---
>
> Changes in v6: None
> Changes in v5: None
> Changes in v4:
> - apollolake -> Apollo Lake
>
> Changes in v3:
> - Move the mrccache_get_region() change into this patch
>
> Changes in v2: None
>
>  arch/x86/include/asm/mrccache.h | 1 +
>  arch/x86/lib/mrccache.c         | 3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
>

applied to u-boot-x86/next, thanks!

Patch
diff mbox series

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);