aboutsummaryrefslogtreecommitdiff
path: root/hdata
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.vnet.ibm.com>2015-11-10 11:41:08 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-11-10 11:41:08 +1100
commit2e86b578d788c689b5b5748006027a3e3d4bb656 (patch)
treee1b02965f1f0d9a65779bdae31585124e9466079 /hdata
parent7c2f38eff810fd2a84707ae15994e3188cfac834 (diff)
downloadskiboot-2e86b578d788c689b5b5748006027a3e3d4bb656.zip
skiboot-2e86b578d788c689b5b5748006027a3e3d4bb656.tar.gz
skiboot-2e86b578d788c689b5b5748006027a3e3d4bb656.tar.bz2
sparse: fix beintXX_t degrades to integer warnings in hdata/iohub.c
No generated code change due to skiboot being BE hdata/iohub.c:49:9: warning: restricted beint64_t degrades to integer hdata/iohub.c:49:9: warning: restricted beint64_t degrades to integer hdata/iohub.c:49:9: warning: restricted beint64_t degrades to integer hdata/iohub.c:49:9: warning: restricted beint64_t degrades to integer hdata/iohub.c:51:9: warning: restricted beint64_t degrades to integer hdata/iohub.c:51:9: warning: restricted beint64_t degrades to integer hdata/iohub.c:51:9: warning: restricted beint64_t degrades to integer hdata/iohub.c:51:9: warning: restricted beint64_t degrades to integer hdata/iohub.c:209:16: warning: restricted beint32_t degrades to integer hdata/iohub.c:356:19: warning: restricted beint32_t degrades to integer hdata/iohub.c:490:19: warning: restricted beint32_t degrades to integer hdata/iohub.c:536:21: warning: restricted beint64_t degrades to integer hdata/iohub.c:554:9: warning: restricted beint32_t degrades to integer hdata/iohub.c:554:9: warning: restricted beint32_t degrades to integer Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hdata')
-rw-r--r--hdata/iohub.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/hdata/iohub.c b/hdata/iohub.c
index 1c69f63..42b1faf 100644
--- a/hdata/iohub.c
+++ b/hdata/iohub.c
@@ -47,9 +47,9 @@ static void io_add_common(struct dt_node *hn, const struct cechub_io_hub *hub)
*/
dt_add_property(hn, "ranges", NULL, 0);
dt_add_property_cells(hn, "ibm,gx-bar-1",
- hi32(hub->gx_ctrl_bar1), lo32(hub->gx_ctrl_bar1));
+ hi32(be64_to_cpu(hub->gx_ctrl_bar1)), lo32(be64_to_cpu(hub->gx_ctrl_bar1)));
dt_add_property_cells(hn, "ibm,gx-bar-2",
- hi32(hub->gx_ctrl_bar2), lo32(hub->gx_ctrl_bar2));
+ hi32(be64_to_cpu(hub->gx_ctrl_bar2)), lo32(be64_to_cpu(hub->gx_ctrl_bar2)));
/* Add presence detect if valid */
if (hub->flags & CECHUB_HUB_FLAG_FAB_BR0_PDT)
@@ -206,8 +206,8 @@ static struct dt_node *io_add_p7ioc(const struct cechub_io_hub *hub,
be64_to_cpu(hub->gx_ctrl_bar4));
/* We only know about memory map 1 */
- if (hub->mem_map_vers != 1) {
- prerror("P7IOC: Unknown memory map %d\n", hub->mem_map_vers);
+ if (be32_to_cpu(hub->mem_map_vers) != 1) {
+ prerror("P7IOC: Unknown memory map %d\n", be32_to_cpu(hub->mem_map_vers));
/* We try to continue anyway ... */
}
@@ -353,7 +353,7 @@ static void io_add_p8_cec_vpd(const struct HDIF_common_hdr *sp_iohubs)
prlog(PR_WARNING, "CEC: IOKID count is 0 !\n");
return;
}
- if (iokids->count > 1) {
+ if (be32_to_cpu(iokids->count) > 1) {
prlog(PR_WARNING, "CEC: WARNING ! More than 1 IO KID !!! (%d)\n",
iokids->count);
/* Ignoring the additional ones */
@@ -487,7 +487,7 @@ static struct dt_node *io_add_hea(const struct cechub_io_hub *hub,
prerror("HEA: IOKID count is 0 !\n");
return NULL;
}
- if (iokids->count > 1) {
+ if (be32_to_cpu(iokids->count) > 1) {
prlog(PR_WARNING, "HEA: WARNING ! More than 1 IO KID !!! (%d)\n",
iokids->count);
}
@@ -533,7 +533,7 @@ static struct dt_node *io_add_hea(const struct cechub_io_hub *hub,
}
/* Assume base address is BAR3 + 0x4000000000 */
- reg[0] = hub->gx_ctrl_bar3 + 0x4000000000;
+ reg[0] = be64_to_cpu(hub->gx_ctrl_bar3) + 0x4000000000;
reg[1] = 0xc0000000;
prlog(PR_DEBUG, "CEC: * Adding HEA to P5IOC2, assuming GBA=0x%llx\n",
@@ -552,7 +552,7 @@ static struct dt_node *io_add_hea(const struct cechub_io_hub *hub,
/* BUID is base + 0x30 */
dt_add_property(np, "interrupt-controller", NULL, 0);
dt_add_property_cells(np, "interrupt-base",
- ((hub->buid_ext << 9) | 0x30) << 4);
+ ((be32_to_cpu(hub->buid_ext) << 9) | 0x30) << 4);
dt_add_property_cells(np, "interrupt-max-count", 128);
/* Always 2 port groups */