summaryrefslogtreecommitdiffstats
path: root/sys/dev/fdt/fdt_common.c
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-05-13 17:59:17 +0000
committerian <ian@FreeBSD.org>2014-05-13 17:59:17 +0000
commit4c1631c2b15b10939521fa505c7995af4409aefb (patch)
tree5f86e09bcec8a3f59d0156b121390c9d34132344 /sys/dev/fdt/fdt_common.c
parent7353aa0b49b83071cf7d18e084e64ca1ca0996c7 (diff)
downloadFreeBSD-src-4c1631c2b15b10939521fa505c7995af4409aefb.zip
FreeBSD-src-4c1631c2b15b10939521fa505c7995af4409aefb.tar.gz
MFC r256932, r256938, r256966, r256953, r256967, r256969, r257015:
Add a new function (OF_getencprop()) that undoes the transformation applied by encode-int. Specifically, it takes a set of 32-bit cell values and changes them to host byte order. Most non-string instances of OF_getprop() should be using this function, which is a no-op on big-endian platforms. Use the new function all over the place.
Diffstat (limited to 'sys/dev/fdt/fdt_common.c')
-rw-r--r--sys/dev/fdt/fdt_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/fdt/fdt_common.c b/sys/dev/fdt/fdt_common.c
index 740ccb5..d6401d2 100644
--- a/sys/dev/fdt/fdt_common.c
+++ b/sys/dev/fdt/fdt_common.c
@@ -523,7 +523,7 @@ fdt_intr_to_rl(phandle_t node, struct resource_list *rl,
/*
* Find #interrupt-cells of the interrupt domain.
*/
- if (OF_getprop(node, "interrupt-parent", &iph, sizeof(iph)) <= 0) {
+ if (OF_getencprop(node, "interrupt-parent", &iph, sizeof(iph)) <= 0) {
debugf("no intr-parent phandle\n");
intr_par = OF_parent(node);
} else {
@@ -583,7 +583,7 @@ fdt_get_phyaddr(phandle_t node, device_t dev, int *phy_addr, void **phy_sc)
uint32_t i;
device_t parent, child;
- if (OF_getprop(node, "phy-handle", (void *)&phy_handle,
+ if (OF_getencprop(node, "phy-handle", (void *)&phy_handle,
sizeof(phy_handle)) <= 0)
return (ENXIO);
OpenPOWER on IntegriCloud