Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/freescale/imx/imx_gpio.c
Show First 20 Lines • Show All 675 Lines • ▼ Show 20 Lines | sc->gpio_pins[i].gp_flags = | ||||
(READ4(sc, IMX_GPIO_OE_REG) & (1U << i)) ? GPIO_PIN_OUTPUT : | (READ4(sc, IMX_GPIO_OE_REG) & (1U << i)) ? GPIO_PIN_OUTPUT : | ||||
GPIO_PIN_INPUT; | GPIO_PIN_INPUT; | ||||
snprintf(sc->gpio_pins[i].gp_name, GPIOMAXNAME, | snprintf(sc->gpio_pins[i].gp_name, GPIOMAXNAME, | ||||
"imx_gpio%d.%d", unit, i); | "imx_gpio%d.%d", unit, i); | ||||
} | } | ||||
#ifdef INTRNG | #ifdef INTRNG | ||||
gpio_pic_register_isrcs(sc); | gpio_pic_register_isrcs(sc); | ||||
intr_pic_register(dev, OF_xref_from_node(ofw_bus_get_node(dev))); | intr_pic_register(dev, OF_xref_from_node(ofw_bus_get_node(dev)), | ||||
sc->gpio_npins); | |||||
#endif | #endif | ||||
sc->sc_busdev = gpiobus_attach_bus(dev); | sc->sc_busdev = gpiobus_attach_bus(dev); | ||||
if (sc->sc_busdev == NULL) { | if (sc->sc_busdev == NULL) { | ||||
imx51_gpio_detach(dev); | imx51_gpio_detach(dev); | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |