Skip to content

Commit

Permalink
hdata: Fix phb4 lane-eq property generation
Browse files Browse the repository at this point in the history
The lane-eq data we get from hdat is all 7s but what we end up in the
device tree is:

xscom@603fc00000000/pbcq@4010c00/stack@0/ibm,lane-eq
		 00000000 31c339e0 00000000 0000000c
		 00000000 00000000 00000000 00000000
		 00000000 31c30000 77777777 77777777
		 77777777 77777777 77777777 77777777

This fixes grabbing the properties from hdat and fixes the call to put
them in the device tree.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
mikey authored and stewartsmith committed Jul 13, 2017
1 parent d63ed06 commit a78732d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions hdata/iohub.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,13 @@ static struct dt_node *add_pec_stack(const struct cechub_io_hub *hub,
dt_add_property_string(stack, "status", "disabled");

for (i = 0; i < 4; i++) /* gen 3 eq settings */
eq[i] = be64_to_cpu(hub->phb4_lane_eq[phb_index][i]);
eq[i] = be64_to_cpu(hub->phb_lane_eq[phb_index][i]);

for (i = 4; i < 8; i++) /* gen 4 eq settings */
eq[i] = be64_to_cpu(hub->phb4_lane_eq[phb_index][i]);
for (i = 0; i < 4; i++) /* gen 4 eq settings */
eq[i+4] = be64_to_cpu(hub->phb4_lane_eq[phb_index][i]);

__dt_add_property_u64s(stack, "ibm,lane-eq", 8, eq);
dt_add_property_u64s(stack, "ibm,lane-eq", eq[0], eq[1], eq[2], eq[3],
eq[4], eq[5], eq[6], eq[7]);

return stack;
}
Expand Down

0 comments on commit a78732d

Please sign in to comment.