Skip to content

Commit

Permalink
hw/phb4: Read ibm,loc-code from PBCQ node
Browse files Browse the repository at this point in the history
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@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
oohal authored and stewartsmith committed Apr 29, 2019
1 parent d318cdb commit 2e21571
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hw/phb4.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 2e21571

Please sign in to comment.