aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2017-04-28 18:01:15 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-05-01 13:25:39 +1000
commitaaa8ccb9a08ddf65872f0d3aff92645bb4454fb3 (patch)
treef81e49f8e0531b345e1bcfa4422274a3517e7daa /hdata
parent6e6d5417ec67797b1dc52c8e30e9b1b4cf64e74f (diff)
downloadskiboot-aaa8ccb9a08ddf65872f0d3aff92645bb4454fb3.zip
skiboot-aaa8ccb9a08ddf65872f0d3aff92645bb4454fb3.tar.gz
skiboot-aaa8ccb9a08ddf65872f0d3aff92645bb4454fb3.tar.bz2
hdata/spira.c: Add device-tree bindings for nest mmu
The nest mmu will only get initialised by opal_nmmu_set_ptcr() if the appropriate device-tree entries exist. Add them during hdata parsing. Signed-off-by: Alistair Popple <alistair@popple.id.au> Acked-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/spira.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/hdata/spira.c b/hdata/spira.c
index 3340a09..46dd1ab 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -791,6 +791,20 @@ static void add_nx(void)
}
}
+static void add_nmmu(void)
+{
+ struct dt_node *xscom, *nmmu;
+
+ /* Nest MMU only exists on POWER9 */
+ if (proc_gen != proc_gen_p9)
+ return;
+
+ dt_for_each_compatible(dt_root, xscom, "ibm,xscom") {
+ nmmu = dt_new_addr(xscom, "nmmu", 0x5012c40);
+ dt_add_property_strings(nmmu, "compatible", "ibm,power9-nest-mmu");
+ dt_add_property_cells(nmmu, "reg", 0x5012c40, 0x20);
+ }
+}
static void add_iplparams_sys_params(const void *iplp, struct dt_node *node)
{
@@ -1265,6 +1279,9 @@ int parse_hdat(bool is_opal)
/* Add NX */
add_nx();
+ /* Add nest mmu */
+ add_nmmu();
+
/* Add IO HUBs and/or PHBs */
io_parse();