diff mbox series

[RESEND,v2,3/4] npu2, npu3: Remove ibm, phb-index property from the NPU dt node

Message ID 20200122150336.2623-3-fbarrat@linux.ibm.com
State Accepted
Headers show
Series [RESEND,v2,1/4] npu2: Rework phb-index assignments for virtual PHBs | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch warning Failed to apply on branch master (d75e82dbfbb9443efeb3f9a5921ac23605aab469)
snowpatch_ozlabs/apply_patch fail Failed to apply to any branch

Commit Message

Frederic Barrat Jan. 22, 2020, 3:03 p.m. UTC
The 'ibm,phb-index' property of the NPU node is now useless, as we can
have multiple PHBs associated to the same NPU on P9. Let's remove it
to avoid confusion.

Reviewed-by: Reza Arbab <arbab@linux.ibm.com>
Reviewed-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com>
---
Changelog:
v2: no change

 doc/device-tree/opencapi.rst | 1 -
 hdata/spira.c                | 6 ++----
 hdata/test/op920.wsp.dts     | 2 --
 hw/npu3.c                    | 1 -
 platforms/astbmc/mihawk.c    | 2 --
 platforms/astbmc/zaius.c     | 2 --
 platforms/ibm-fsp/zz.c       | 2 --
 7 files changed, 2 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/doc/device-tree/opencapi.rst b/doc/device-tree/opencapi.rst
index 80ff9963..497654ac 100644
--- a/doc/device-tree/opencapi.rst
+++ b/doc/device-tree/opencapi.rst
@@ -19,7 +19,6 @@  NVLink links are currently unsupported.
     npu@5011000 {
       compatible = "ibm,power9-npu";
       phandle = <0xe6>;
-      ibm,phb-index = <0x7>;
       reg = <0x5011000 0x2c>;
       ibm,npu-index = <0x0>;
       ibm,npu-links = <0x2>; /* Number of links wired up to this npu. */
diff --git a/hdata/spira.c b/hdata/spira.c
index 77c937b1..7c5918d2 100644
--- a/hdata/spira.c
+++ b/hdata/spira.c
@@ -1451,7 +1451,7 @@  static void add_stop_levels(void)
 #define NPU_INDIRECT1	0x800000000c010c3fULL
 
 static void add_npu(struct dt_node *xscom, const struct HDIF_array_hdr *links,
-			int npu_index, int phb_index)
+			int npu_index)
 {
 	const struct sppcrd_smp_link *link;
 	struct dt_node *npu;
@@ -1472,7 +1472,6 @@  static void add_npu(struct dt_node *xscom, const struct HDIF_array_hdr *links,
 	dt_add_property_cells(npu, "#address-cells", 1);
 
 	dt_add_property_strings(npu, "compatible", "ibm,power9-npu");
-	dt_add_property_cells(npu, "ibm,phb-index", phb_index);
 	dt_add_property_cells(npu, "ibm,npu-index", npu_index);
 
 	HDIF_iarray_for_each(links, i, link) {
@@ -1622,7 +1621,6 @@  static void add_npu(struct dt_node *xscom, const struct HDIF_array_hdr *links,
 static void add_npus(void)
 {
 	struct dt_node *xscom;
-	int phb_index = 7; /* Start counting from 7, for no reason */
 	int npu_index = 0;
 
 	/* Only consult HDAT for npu2 */
@@ -1647,7 +1645,7 @@  static void add_npus(void)
 
 		/* some hostboots will give us an empty array */
 		if (be32_to_cpu(links->ecnt))
-			add_npu(xscom, links, npu_index++, phb_index++);
+			add_npu(xscom, links, npu_index++);
 	}
 }
 
diff --git a/hdata/test/op920.wsp.dts b/hdata/test/op920.wsp.dts
index e26fa127..f9ead923 100644
--- a/hdata/test/op920.wsp.dts
+++ b/hdata/test/op920.wsp.dts
@@ -4065,7 +4065,6 @@ 
 			#size-cells = <0x0>;
 			#address-cells = <0x1>;
 			compatible = "ibm,power9-npu";
-			ibm,phb-index = <0x7>;
 			ibm,npu-index = <0x0>;
 			ibm,npu-links = <0x6>;
 
@@ -4695,7 +4694,6 @@ 
 			#size-cells = <0x0>;
 			#address-cells = <0x1>;
 			compatible = "ibm,power9-npu";
-			ibm,phb-index = <0x8>;
 			ibm,npu-index = <0x1>;
 			ibm,npu-links = <0x6>;
 
diff --git a/hw/npu3.c b/hw/npu3.c
index 4d396b09..65f505a6 100644
--- a/hw/npu3.c
+++ b/hw/npu3.c
@@ -101,7 +101,6 @@  static void npu3_dt_create_npu(struct dt_node *xscom, uint32_t npu_index)
 	dt_add_property_cells(npu, "reg", npu_base[npu_index], 0x2c);
 	dt_add_property_string(npu, "compatible", "ibm,power9-npu3");
 	dt_add_property_cells(npu, "ibm,npu-index", npu_index);
-	dt_add_property_cells(npu, "ibm,phb-index", 7 + npu_index);
 
 	for (uint32_t i = 0; i < NPU3_LINKS_PER_NPU; i++)
 		npu3_dt_create_link(npu, npu_index, i);
diff --git a/platforms/astbmc/mihawk.c b/platforms/astbmc/mihawk.c
index 0491887e..6816accd 100644
--- a/platforms/astbmc/mihawk.c
+++ b/platforms/astbmc/mihawk.c
@@ -184,7 +184,6 @@  static void mihawk_create_npu(void)
 {
 	struct dt_node *xscom, *npu;
 	int npu_index = 0;
-	int phb_index = 7;
 	char namebuf[32];
 
 	/* Return if there's already an NPU in the device tree */
@@ -198,7 +197,6 @@  static void mihawk_create_npu(void)
 		dt_add_property_cells(npu, "reg", NPU_BASE, NPU_SIZE);
 		dt_add_property_strings(npu, "compatible", "ibm,power9-npu");
 		dt_add_property_cells(npu, "ibm,npu-index", npu_index++);
-		dt_add_property_cells(npu, "ibm,phb-index", phb_index++);
 		dt_add_property_cells(npu, "ibm,npu-links", 2);
 		create_link(npu, 1, 2);
 		create_link(npu, 2, 3);
diff --git a/platforms/astbmc/zaius.c b/platforms/astbmc/zaius.c
index ab355888..36dee632 100644
--- a/platforms/astbmc/zaius.c
+++ b/platforms/astbmc/zaius.c
@@ -157,7 +157,6 @@  static void zaius_create_npu(void)
 {
 	struct dt_node *xscom, *npu;
 	int npu_index = 0;
-	int phb_index = 7;
 	char namebuf[32];
 
 	/* Abort if there's already an NPU in the device tree */
@@ -171,7 +170,6 @@  static void zaius_create_npu(void)
 		dt_add_property_cells(npu, "reg", NPU_BASE, NPU_SIZE);
 		dt_add_property_strings(npu, "compatible", "ibm,power9-npu");
 		dt_add_property_cells(npu, "ibm,npu-index", npu_index++);
-		dt_add_property_cells(npu, "ibm,phb-index", phb_index++);
 		dt_add_property_cells(npu, "ibm,npu-links", 2);
 		create_link(npu, 1, 2);
 		create_link(npu, 2, 3);
diff --git a/platforms/ibm-fsp/zz.c b/platforms/ibm-fsp/zz.c
index 2bde315c..92f4fcb2 100644
--- a/platforms/ibm-fsp/zz.c
+++ b/platforms/ibm-fsp/zz.c
@@ -65,7 +65,6 @@  static void add_opencapi_dt_nodes(void)
 {
 	struct dt_node *npu, *xscom;
 	int npu_index = 0;
-	int phb_index = 7;
 
 	/*
 	 * In an ideal world, we should get all the NPU links
@@ -115,7 +114,6 @@  static void add_opencapi_dt_nodes(void)
 		dt_add_property_cells(npu, "reg", NPU_BASE, NPU_SIZE);
 		dt_add_property_strings(npu, "compatible", "ibm,power9-npu");
 		dt_add_property_cells(npu, "ibm,npu-index", npu_index++);
-		dt_add_property_cells(npu, "ibm,phb-index", phb_index++);
 		dt_add_property_cells(npu, "ibm,npu-links", 2);
 
 		create_link(npu, 1, 2);