summaryrefslogtreecommitdiffstats
path: root/hdata/fsp.c
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-11-09 17:51:27 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-11-09 17:51:27 +1100
commit5c3e642911ed217bc476478694281a89fe8ef73c (patch)
treeb28c5f8de83a3b2daad507dd2289db7b8a8d06b3 /hdata/fsp.c
parentd6e3293cb1d794bf118aab334bb250ed12236956 (diff)
downloadtalos-skiboot-5c3e642911ed217bc476478694281a89fe8ef73c.tar.gz
talos-skiboot-5c3e642911ed217bc476478694281a89fe8ef73c.zip
sparse: fix incorrect type warnings in hdata/fsp.c
No changes in resulting code as skiboot is BE, but does silence the sparse warnings. hdata/fsp.c:67:9: warning: incorrect type in initializer (different base types) hdata/fsp.c:67:9: expected unsigned int hdata/fsp.c:67:9: got restricted beint16_t const [usertype] hw_version hdata/fsp.c:68:9: warning: incorrect type in initializer (different base types) hdata/fsp.c:68:9: expected unsigned int hdata/fsp.c:68:9: got restricted beint16_t const [usertype] sw_version hdata/fsp.c:103:46: warning: incorrect type in argument 1 (different base types) hdata/fsp.c:103:46: expected unsigned int [unsigned] [usertype] proc_chip_id hdata/fsp.c:103:46: got restricted beint32_t const [usertype] proc_chip_id Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata/fsp.c')
-rw-r--r--hdata/fsp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hdata/fsp.c b/hdata/fsp.c
index 595e1f8b..9ea5137a 100644
--- a/hdata/fsp.c
+++ b/hdata/fsp.c
@@ -64,8 +64,8 @@ static struct dt_node *fsp_create_node(const void *spss, int i,
"ibm,fsp2");
dt_add_property_cells(node, "reg-offset", 0xb0011000);
}
- dt_add_property_cells(node, "hw-version", sp_impl->hw_version);
- dt_add_property_cells(node, "sw-version", sp_impl->sw_version);
+ dt_add_property_cells(node, "hw-version", be16_to_cpu(sp_impl->hw_version));
+ dt_add_property_cells(node, "sw-version", be16_to_cpu(sp_impl->sw_version));
if (be16_to_cpu(sp_impl->func_flags) & SPSS_SP_IMPL_FLAGS_PRIMARY)
dt_add_property(node, "primary", NULL, 0);
@@ -100,7 +100,7 @@ static uint32_t fsp_create_link(const struct spss_iopath *iopath, int index,
prlog(PR_DEBUG, "FSP #%d: IO PATH %d is %s PSI Link, GXHB at %llx\n",
fsp_index, index, ststr, (long long)iopath->psi.gxhb_base);
- chip_id = pcid_to_chip_id(iopath->psi.proc_chip_id);
+ chip_id = pcid_to_chip_id(be32_to_cpu(iopath->psi.proc_chip_id));
node = dt_find_compatible_node_on_chip(dt_root, NULL, "ibm,psihb-x",
chip_id);
if (!node) {
OpenPOWER on IntegriCloud