aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>2017-05-24 22:02:09 -0700
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-08-01 12:35:56 +1000
commite320a95aa0a21f093965ee478f43d077541126d4 (patch)
treea3f180cdc26e3ed92eebeaee08774314ce12d107
parente35f7a312fc7ad63756bf851c6e08d07dedf64b4 (diff)
downloadskiboot-e320a95aa0a21f093965ee478f43d077541126d4.zip
skiboot-e320a95aa0a21f093965ee478f43d077541126d4.tar.gz
skiboot-e320a95aa0a21f093965ee478f43d077541126d4.tar.bz2
vas: Create xscom DT node in hdata
Create the VAS xscom node in hdata and use that when initializing VAS. Suggested-by: Ben Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r--hdata/spira.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/hdata/spira.c b/hdata/spira.c
index d09dbfe..46be1c9 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -358,6 +358,20 @@ 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);
+
+ dt_add_property_cells(vas, "reg", VAS_SCOM_BASE_ADDR, 0x300);
+ dt_add_property_string(vas, "compatible", "ibm,power9-vas-x");
+ dt_add_property_cells(vas, "ibm,vas-id", idx);
+}
+
static void add_xscom_add_pcia_assoc(struct dt_node *np, uint32_t pcid)
{
const struct HDIF_common_hdr *hdr;
@@ -471,6 +485,7 @@ static bool add_xscom_sppcrd(uint64_t xscom_base)
if (proc_gen >= proc_gen_p9) {
add_xive_node(np);
parse_i2c_devs(hdif, SPPCRD_IDATA_HOST_I2C, np);
+ add_vas_node(np, i);
}
}