aboutsummaryrefslogtreecommitdiff
path: root/platforms
diff options
context:
space:
mode:
authorAlistair Popple <alistair@popple.id.au>2016-04-22 13:35:25 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-04-27 08:01:17 +1000
commitc814ef51febb2c3a65086c09f8cee8c3c5e16a51 (patch)
treed8a0e1b7400e14d49f75adfaffd2b8ffdd5c7fdb /platforms
parentd729ddbfd8cb7b5dc60f336bf7208214c96a3233 (diff)
downloadskiboot-c814ef51febb2c3a65086c09f8cee8c3c5e16a51.zip
skiboot-c814ef51febb2c3a65086c09f8cee8c3c5e16a51.tar.gz
skiboot-c814ef51febb2c3a65086c09f8cee8c3c5e16a51.tar.bz2
hw/npu.c: Add ibm, npu-index property to npu device tree
The PHB slot location code ueses the ibm,phb-index property to find slot location names. As the NPU is implemented as a different PHB type it means the phb-index property overlaps with the other PHBs in the system. This patch changes the existing usage of phb-index to npu-index which allows the phb-index property to be assigned a unique value which can then be matched by the PHB slot location code. Signed-off-by: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r--platforms/astbmc/garrison.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/platforms/astbmc/garrison.c b/platforms/astbmc/garrison.c
index 57e41d7..bf4bb69 100644
--- a/platforms/astbmc/garrison.c
+++ b/platforms/astbmc/garrison.c
@@ -65,6 +65,10 @@ static void dt_create_npu(void)
npu = dt_new(xscom, namebuf);
dt_add_property_cells(npu, "reg", NPU_BASE, NPU_SIZE);
dt_add_property_strings(npu, "compatible", "ibm,power8-npu");
+
+ /* Use the first available PHB index which is 4 given
+ * there are three normal PHBs. */
+ dt_add_property_cells(npu, "ibm,phb-index", 4);
dt_add_property_cells(npu, "ibm,npu-index", 0);
dt_add_property_cells(npu, "ibm,npu-links", 4);