aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2017-09-18 12:24:24 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-09-18 12:24:28 +1000
commit6f3c61974738e2d75c94d3fa5988b148389854ce (patch)
treeda2153f218d813241f4522c8b3ac29729142c6ce /hdata
parent398a981236418377485f912924dc6800d4d773d2 (diff)
downloadskiboot-6f3c61974738e2d75c94d3fa5988b148389854ce.zip
skiboot-6f3c61974738e2d75c94d3fa5988b148389854ce.tar.gz
skiboot-6f3c61974738e2d75c94d3fa5988b148389854ce.tar.bz2
hdat: fix parsing of P8 hdat
Also fixes hdat_to_dt test cases. Fixes: ad484081ef8a51811e7902aec436fa8f1ca9604a Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/iohub.c7
-rw-r--r--hdata/test/stubs.c2
2 files changed, 3 insertions, 6 deletions
diff --git a/hdata/iohub.c b/hdata/iohub.c
index 567ab59..4c4178d 100644
--- a/hdata/iohub.c
+++ b/hdata/iohub.c
@@ -798,8 +798,6 @@ static void io_parse_slots(const void *sp_iohubs, int hub_id)
const struct slot_map_entry *entry;
unsigned int i, count;
- dt_slots = get_slot_node();
-
ioslot_arr = HDIF_child_arr(sp_iohubs, CECHUB_CHILD_IOSLOTS);
if (!ioslot_arr)
return;
@@ -808,6 +806,8 @@ static void io_parse_slots(const void *sp_iohubs, int hub_id)
if (!count)
return;
+ dt_slots = get_slot_node();
+
prlog(PR_DEBUG, "CEC: Found slot map for IOHUB %d\n", hub_id);
if (count > 1)
prerror("CEC: Multiple IOSLOTs found for IO HUB %d\n", hub_id);
@@ -846,9 +846,6 @@ static void io_parse_fru(const void *sp_iohubs)
unsigned int size, hub_id;
uint32_t chip_id;
- if(i > 0)
- break;
-
hub = HDIF_get_iarray_item(sp_iohubs, CECHUB_FRU_IO_HUBS,
i, &size);
if (!hub || size < CECHUB_IOHUB_MIN_SIZE) {
diff --git a/hdata/test/stubs.c b/hdata/test/stubs.c
index cb166f9..abeb832 100644
--- a/hdata/test/stubs.c
+++ b/hdata/test/stubs.c
@@ -97,7 +97,6 @@ STUB(op_display);
STUB(fsp_preload_lid);
STUB(fsp_wait_lid_loaded);
STUB(fsp_adjust_lid_side);
-STUB(backtrace);
/* Add HW specific stubs here */
static bool true_stub(void) { return true; }
@@ -117,4 +116,5 @@ NOOP_STUB(mem_reserve_fw);
NOOP_STUB(mem_reserve_hwbuf);
NOOP_STUB(add_chip_dev_associativity);
NOOP_STUB(enable_mambo_console);
+NOOP_STUB(backtrace);