[Skiboot] [PATCH 06/16] hdata: Fix phb4 lane-eq property generation
Michael Neuling
mikey at neuling.org
Wed Jul 12 12:06:45 AEST 2017
The lane-eq data we get from hdat is all 7s but what we end up in the
device tree is:
xscom at 603fc00000000/pbcq at 4010c00/stack at 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 at neuling.org>
---
hdata/iohub.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/hdata/iohub.c b/hdata/iohub.c
index c0b9bf802e..de163da678 100644
--- a/hdata/iohub.c
+++ b/hdata/iohub.c
@@ -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;
}
--
2.11.0
More information about the Skiboot
mailing list