[Skiboot] [PATCH 1/2] hw/phb4: Read ibm,loc-code from PBCQ node

Oliver O'Halloran oohall at gmail.com
Tue Apr 23 17:56:06 AEST 2019


On P9 the PBCQs are subdivided by stacks which implement the PCI Express
logic. When phb4 was forked from phb3 most of the properties that were
in the pbcq node moved into the stack node, but ibm,loc-code was not one
of them. This patch fixes the phb4 init sequence to read the base
location code from the PBCQ node (parent of the stack node) rather than
the stack node itself.

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 hw/phb4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/phb4.c b/hw/phb4.c
index 52aedc890f16..716ca7295af1 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -5874,8 +5874,8 @@ static void phb4_probe_stack(struct dt_node *stk_node, uint32_t pec_index,
 		dt_add_property_cells(np, "ibm,hub-id", hub_id);
 	}
 
-	if (dt_has_node_property(stk_node, "ibm,loc-code", NULL)) {
-		const char *lc = dt_prop_get(stk_node, "ibm,loc-code");
+	if (dt_has_node_property(stk_node->parent, "ibm,loc-code", NULL)) {
+		const char *lc = dt_prop_get(stk_node->parent, "ibm,loc-code");
 		dt_add_property_string(np, "ibm,loc-code", lc);
 	}
 	if (dt_has_node_property(stk_node, "ibm,lane-eq", NULL)) {
-- 
2.20.1



More information about the Skiboot mailing list