Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/xscale/pxa/pxa_obio.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
static int pxa_print_child(device_t, device_t); | static int pxa_print_child(device_t, device_t); | ||||
static int pxa_setup_intr(device_t, device_t, struct resource *, int, | static int pxa_setup_intr(device_t, device_t, struct resource *, int, | ||||
driver_filter_t *, driver_intr_t *, void *, void **); | driver_filter_t *, driver_intr_t *, void *, void **); | ||||
static int pxa_read_ivar(device_t, device_t, int, uintptr_t *); | static int pxa_read_ivar(device_t, device_t, int, uintptr_t *); | ||||
static struct resource_list * pxa_get_resource_list(device_t, device_t); | static struct resource_list * pxa_get_resource_list(device_t, device_t); | ||||
static struct resource * pxa_alloc_resource(device_t, device_t, int, | static struct resource * pxa_alloc_resource(device_t, device_t, int, | ||||
int *, u_long, u_long, u_long, u_int); | int *, rman_res_t, rman_res_t, rman_res_t, u_int); | ||||
static int pxa_release_resource(device_t, device_t, int, | static int pxa_release_resource(device_t, device_t, int, | ||||
int, struct resource *); | int, struct resource *); | ||||
static int pxa_activate_resource(device_t, device_t, | static int pxa_activate_resource(device_t, device_t, | ||||
int, int, struct resource *); | int, int, struct resource *); | ||||
static struct resource * pxa_alloc_gpio_irq(device_t, device_t, int, | static struct resource * pxa_alloc_gpio_irq(device_t, device_t, int, | ||||
int *, u_long, u_long, u_long, u_int); | int *, rman_res_t, rman_res_t, rman_res_t, u_int); | ||||
struct obio_device { | struct obio_device { | ||||
const char *od_name; | const char *od_name; | ||||
u_long od_base; | u_long od_base; | ||||
u_long od_size; | u_long od_size; | ||||
u_int od_irqs[5]; | u_int od_irqs[5]; | ||||
struct resource_list od_resources; | struct resource_list od_resources; | ||||
}; | }; | ||||
▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
if (od == NULL) | if (od == NULL) | ||||
return (NULL); | return (NULL); | ||||
return (&od->od_resources); | return (&od->od_resources); | ||||
} | } | ||||
static struct resource * | static struct resource * | ||||
pxa_alloc_resource(device_t dev, device_t child, int type, int *rid, | pxa_alloc_resource(device_t dev, 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 obio_softc *sc; | struct obio_softc *sc; | ||||
struct obio_device *od; | struct obio_device *od; | ||||
struct resource *rv; | struct resource *rv; | ||||
struct resource_list *rl; | struct resource_list *rl; | ||||
struct resource_list_entry *rle; | struct resource_list_entry *rle; | ||||
struct rman *rm; | struct rman *rm; | ||||
int needactivate; | int needactivate; | ||||
▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
}; | }; | ||||
static devclass_t pxa_devclass; | static devclass_t pxa_devclass; | ||||
DRIVER_MODULE(pxa, nexus, pxa_driver, pxa_devclass, 0, 0); | DRIVER_MODULE(pxa, nexus, pxa_driver, pxa_devclass, 0, 0); | ||||
static struct resource * | static struct resource * | ||||
pxa_alloc_gpio_irq(device_t dev, device_t child, int type, int *rid, | pxa_alloc_gpio_irq(device_t dev, 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 obio_softc *sc; | struct obio_softc *sc; | ||||
struct obio_device *od; | struct obio_device *od; | ||||
struct resource_list *rl; | struct resource_list *rl; | ||||
struct resource_list_entry *rle; | struct resource_list_entry *rle; | ||||
struct resource *rv; | struct resource *rv; | ||||
struct rman *rm; | struct rman *rm; | ||||
int needactivate; | int needactivate; | ||||
Show All 22 Lines | |||||
if (needactivate) { | if (needactivate) { | ||||
if (bus_activate_resource(child, type, *rid, rv)) { | if (bus_activate_resource(child, type, *rid, rv)) { | ||||
rman_release_resource(rv); | rman_release_resource(rv); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
} | } | ||||
if (bootverbose) | if (bootverbose) | ||||
device_printf(dev, "lazy allocation of irq %ld for %s\n", | device_printf(dev, "lazy allocation of irq %jd for %s\n", | ||||
start, device_get_nameunit(child)); | start, device_get_nameunit(child)); | ||||
return (rv); | return (rv); | ||||
} | } | ||||
Context not available. |