From c814ef51febb2c3a65086c09f8cee8c3c5e16a51 Mon Sep 17 00:00:00 2001 From: Alistair Popple Date: Fri, 22 Apr 2016 13:35:25 +1000 Subject: 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 Signed-off-by: Stewart Smith --- platforms/astbmc/garrison.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'platforms/astbmc') 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); -- cgit v1.1