aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-11-10 11:20:16 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-01-21 15:25:23 +1100
commite59340ea120cdea1d198b29333fa78dee426857d (patch)
tree1bd651fc921985503baa1fdb92be3ab0498d7638 /hdata
parent3171be5dd7aa7fbfb53299263de368469bee8870 (diff)
downloadskiboot-e59340ea120cdea1d198b29333fa78dee426857d.zip
skiboot-e59340ea120cdea1d198b29333fa78dee426857d.tar.gz
skiboot-e59340ea120cdea1d198b29333fa78dee426857d.tar.bz2
sparse: fix missing beXX_to_cpu() conversions in hdata/fsp.c
commit 7c2f38eff810fd2a84707ae15994e3188cfac834 upstream hdata/fsp.c:55:20: warning: restricted beint16_t degrades to integer hdata/fsp.c:62:27: warning: restricted beint16_t degrades to integer hdata/fsp.c:85:27: warning: restricted beint16_t degrades to integer hdata/fsp.c:85:27: warning: restricted beint16_t degrades to integer hdata/fsp.c:100:9: warning: cast from restricted beint64_t hdata/fsp.c:144:27: warning: restricted beint16_t degrades to integer doesn't do anything currently as skiboot is BE Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/fsp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/hdata/fsp.c b/hdata/fsp.c
index 158b78b..a43a622 100644
--- a/hdata/fsp.c
+++ b/hdata/fsp.c
@@ -53,14 +53,14 @@ static struct dt_node *fsp_create_node(const void *spss, int i,
assert(node);
dt_add_property_cells(node, "reg", i);
- if (sp_impl->hw_version == 1) {
+ if (be16_to_cpu(sp_impl->hw_version) == 1) {
dt_add_property_strings(node, "compatible", "ibm,fsp",
"ibm,fsp1");
/* Offset into the FSP MMIO space where the mailbox
* registers are */
/* seen in the FSP1 spec */
dt_add_property_cells(node, "reg-offset", 0xb0016000);
- } else if (sp_impl->hw_version == 2) {
+ } else if (be16_to_cpu(sp_impl->hw_version) == 2) {
dt_add_property_strings(node, "compatible", "ibm,fsp",
"ibm,fsp2");
dt_add_property_cells(node, "reg-offset", 0xb0011000);
@@ -83,7 +83,7 @@ static uint32_t fsp_create_link(const struct spss_iopath *iopath, int index,
bool working = false;
uint32_t chip_id;
- switch(iopath->psi.link_status) {
+ switch(be16_to_cpu(iopath->psi.link_status)) {
case SPSS_IO_PATH_PSI_LINK_BAD_FRU:
ststr = "Broken";
break;
@@ -99,7 +99,7 @@ static uint32_t fsp_create_link(const struct spss_iopath *iopath, int index,
ststr = "Unknown";
}
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);
+ fsp_index, index, ststr, (long long)be64_to_cpu(iopath->psi.gxhb_base));
chip_id = pcid_to_chip_id(iopath->psi.proc_chip_id);
node = dt_find_compatible_node_on_chip(dt_root, NULL, "ibm,psihb-x",
@@ -142,7 +142,7 @@ static void fsp_create_links(const void *spss, int index,
prerror("FSP #%d: Can't find IO PATH %d\n", index, i);
break;
}
- if (iopath->iopath_type != SPSS_IOPATH_TYPE_PSI) {
+ if (be16_to_cpu(iopath->iopath_type) != SPSS_IOPATH_TYPE_PSI) {
prerror("FSP #%d: Unsupported IO PATH %d type 0x%04x\n",
index, i, iopath->iopath_type);
continue;