[Skiboot] [PATCH 16/61] hdat/spira: Add ibm, power10-vas-x string to VAS compatible property
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Mon Jul 19 23:19:27 AEST 2021
From: Haren Myneni <haren at linux.ibm.com>
VAS SCOM base address and paste address format are changed on P10.
This patch adds ibm,power10-vas-x string to compatible property per
each VAS node. This compatible string is used to define the paste
base address later during VAS initialization.
Also enables NX on P10 without adding any compatible string since
the NX SCOM base address is not changed.
Signed-off-by: Haren Myneni <haren at linux.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
hdata/spira.c | 25 ++++++++++++++++---------
include/vas.h | 5 +++--
2 files changed, 19 insertions(+), 11 deletions(-)
diff --git a/hdata/spira.c b/hdata/spira.c
index 2fd3da108..b7101d72e 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -12,6 +12,7 @@
#include <fsp-attn.h>
#include <fsp-leds.h>
#include <skiboot.h>
+#include <vas.h>
#include "hdata.h"
#include "hostservices.h"
@@ -475,17 +476,23 @@ static void add_xive_node(struct dt_node *np)
dt_add_property(xive, "force-assign-bars", NULL, 0);
}
-/*
- * SCOM Base Address from P9 SCOM Assignment spreadsheet
- */
-#define VAS_SCOM_BASE_ADDR 0x03011800
-
static void add_vas_node(struct dt_node *np, int idx)
{
- struct dt_node *vas = dt_new_addr(np, "vas", VAS_SCOM_BASE_ADDR);
+ struct dt_node *vas;
+ const char *comp;
+ uint64_t base_addr;
- dt_add_property_cells(vas, "reg", VAS_SCOM_BASE_ADDR, 0x300);
- dt_add_property_string(vas, "compatible", "ibm,power9-vas-x");
+ if (proc_gen == proc_gen_p9) {
+ base_addr = P9_VAS_SCOM_BASE_ADDR;
+ comp = "ibm,power9-vas-x";
+ } else {
+ base_addr = VAS_SCOM_BASE_ADDR;
+ comp = "ibm,power10-vas-x";
+ }
+
+ vas = dt_new_addr(np, "vas", base_addr);
+ dt_add_property_cells(vas, "reg", base_addr, 0x300);
+ dt_add_property_string(vas, "compatible", comp);
dt_add_property_cells(vas, "ibm,vas-id", idx);
}
@@ -906,10 +913,10 @@ static void add_nx_node(u32 gcid)
"ibm,power8-nx");
break;
case proc_gen_p9:
+ case proc_gen_p10:
/* POWER9 NX is not software compatible with P8 NX */
dt_add_property_strings(nx, "compatible", "ibm,power9-nx");
break;
- case proc_gen_p10: /* XXX P10 */
default:
return;
}
diff --git a/include/vas.h b/include/vas.h
index 1c06e5606..369c3807a 100644
--- a/include/vas.h
+++ b/include/vas.h
@@ -67,9 +67,10 @@ extern __attrconst uint64_t vas_get_wcbs_bar(int chipid);
#define VAS_WINDOWS_PER_CHIP 65536 /* 64K */
/*
- * SCOM Base Address from P9 SCOM Assignment spreadsheet
+ * SCOM Base Address from P9/P10 SCOM Assignment spreadsheet
*/
-#define VAS_SCOM_BASE_ADDR 0x03011800
+#define P9_VAS_SCOM_BASE_ADDR 0x03011800
+#define VAS_SCOM_BASE_ADDR 0x02011400
/*
* NOTE: VAS_SCOM_BASE_ADDR (0x3011800) includes the SCOM ring of 6. So,
--
2.31.1
More information about the Skiboot
mailing list