diff options
Diffstat (limited to 'sys/arm/rockchip/rk30xx_gpio.c')
-rw-r--r-- | sys/arm/rockchip/rk30xx_gpio.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/arm/rockchip/rk30xx_gpio.c b/sys/arm/rockchip/rk30xx_gpio.c index 609eb6a..60dd57b 100644 --- a/sys/arm/rockchip/rk30xx_gpio.c +++ b/sys/arm/rockchip/rk30xx_gpio.c @@ -526,10 +526,8 @@ rk30_gpios_prop_handle(phandle_t ctrl, pcell_t *gpios, int len) if (sc == NULL) return ENXIO; - if (OF_getprop(ctrl, "#gpio-cells", &gpio_cells, sizeof(pcell_t)) < 0) + if (OF_getencprop(ctrl, "#gpio-cells", &gpio_cells, sizeof(pcell_t)) < 0) return (ENXIO); - - gpio_cells = fdt32_to_cpu(gpio_cells); if (gpio_cells != 2) return (ENXIO); @@ -546,9 +544,9 @@ rk30_gpios_prop_handle(phandle_t ctrl, pcell_t *gpios, int len) inc = sizeof(ihandle_t) / sizeof(pcell_t); gpios += inc; for (t = 0; t < tuples; t++) { - pin = fdt32_to_cpu(gpios[0]); - dir = fdt32_to_cpu(gpios[1]); - flags = fdt32_to_cpu(gpios[2]); + pin = gpios[0]; + dir = gpios[1]; + flags = gpios[2]; for (i = 0; i < sc->sc_gpio_npins; i++) { if (sc->sc_gpio_pins[i].gp_pin == pin) @@ -601,7 +599,7 @@ rk30_gpio_init(void) return (ENXIO); /* Get 'gpios' property. */ - OF_getprop(child, "gpios", &gpios, len); + OF_getencprop(child, "gpios", gpios, len); e = (struct gpio_ctrl_entry *)&gpio_controllers; @@ -612,7 +610,7 @@ rk30_gpio_init(void) * contain a ref. to a node defining GPIO * controller. */ - ctrl = OF_node_from_xref(fdt32_to_cpu(gpios[0])); + ctrl = OF_node_from_xref(gpios[0]); if (fdt_is_compatible(ctrl, e->compat)) /* Call a handler. */ |