diff options
author | ian <ian@FreeBSD.org> | 2014-05-13 17:59:17 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-05-13 17:59:17 +0000 |
commit | 4c1631c2b15b10939521fa505c7995af4409aefb (patch) | |
tree | 5f86e09bcec8a3f59d0156b121390c9d34132344 /sys/arm | |
parent | 7353aa0b49b83071cf7d18e084e64ca1ca0996c7 (diff) | |
download | FreeBSD-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/arm')
-rw-r--r-- | sys/arm/mv/gpio.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/arm/mv/gpio.c b/sys/arm/mv/gpio.c index c87bfd5..5f79bef 100644 --- a/sys/arm/mv/gpio.c +++ b/sys/arm/mv/gpio.c @@ -605,7 +605,6 @@ int platform_gpio_init(void) { phandle_t child, parent, root, ctrl; - ihandle_t ctrl_ihandle; pcell_t gpios[MAX_PINS_PER_NODE * GPIOS_PROP_CELLS]; struct gpio_ctrl_entry *e; int len, rv; @@ -639,9 +638,7 @@ platform_gpio_init(void) * contain a ref. to a node defining GPIO * controller. */ - ctrl_ihandle = (ihandle_t)gpios[0]; - ctrl_ihandle = fdt32_to_cpu(ctrl_ihandle); - ctrl = OF_instance_to_package(ctrl_ihandle); + ctrl = OF_xref_phandle(fdt32_to_cpu(gpios[0])); if (fdt_is_compatible(ctrl, e->compat)) /* Call a handler. */ |