Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/gpio/gpiobus.c
Context not available. | |||||
sc->sc_intr_rman.rm_type = RMAN_ARRAY; | sc->sc_intr_rman.rm_type = RMAN_ARRAY; | ||||
sc->sc_intr_rman.rm_descr = "GPIO Interrupts"; | sc->sc_intr_rman.rm_descr = "GPIO Interrupts"; | ||||
if (rman_init(&sc->sc_intr_rman) != 0 || | if (rman_init(&sc->sc_intr_rman) != 0 || | ||||
rman_manage_region(&sc->sc_intr_rman, 0, ~0) != 0) | rman_manage_region(&sc->sc_intr_rman, 0, RM_MAX_END) != 0) | ||||
panic("%s: failed to set up rman.", __func__); | panic("%s: failed to set up rman.", __func__); | ||||
if (GPIO_PIN_MAX(sc->sc_dev, &sc->sc_npins) != 0) | if (GPIO_PIN_MAX(sc->sc_dev, &sc->sc_npins) != 0) | ||||
Context not available. | |||||
static int | static int | ||||
gpiobus_set_resource(device_t dev, device_t child, int type, int rid, | gpiobus_set_resource(device_t dev, device_t child, int type, int rid, | ||||
u_long start, u_long count) | rman_res_t start, rman_res_t count) | ||||
{ | { | ||||
struct gpiobus_ivar *devi; | struct gpiobus_ivar *devi; | ||||
struct resource_list_entry *rle; | struct resource_list_entry *rle; | ||||
Context not available. | |||||
static struct resource * | static struct resource * | ||||
gpiobus_alloc_resource(device_t bus, device_t child, int type, int *rid, | gpiobus_alloc_resource(device_t bus, device_t child, int type, int *rid, | ||||
u_long start, u_long end, u_long count, u_int flags) | rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) | ||||
{ | { | ||||
struct gpiobus_softc *sc; | struct gpiobus_softc *sc; | ||||
struct resource *rv; | struct resource *rv; | ||||
Context not available. | |||||
if (type != SYS_RES_IRQ) | if (type != SYS_RES_IRQ) | ||||
return (NULL); | return (NULL); | ||||
isdefault = (start == 0UL && end == ~0UL && count == 1); | isdefault = (start == 0 && end == ~0 && count == 1); | ||||
rle = NULL; | rle = NULL; | ||||
if (isdefault) { | if (isdefault) { | ||||
rl = BUS_GET_RESOURCE_LIST(bus, child); | rl = BUS_GET_RESOURCE_LIST(bus, child); | ||||
Context not available. |