Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm/ti/omap4/omap4_wugen.c
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
struct omap4_wugen_sc { | struct omap4_wugen_sc { | ||||
device_t sc_dev; | device_t sc_dev; | ||||
struct resource *sc_mem_res; | struct resource *sc_mem_res; | ||||
device_t sc_parent; | device_t sc_parent; | ||||
}; | }; | ||||
static int | static int | ||||
omap4_wugen_alloc_intr(device_t dev, struct intr_irqsrc *isrc, | omap4_wugen_activate_intr(device_t dev, struct intr_irqsrc *isrc, | ||||
struct resource *res, struct intr_map_data *data) | struct resource *res, struct intr_map_data *data) | ||||
{ | { | ||||
struct omap4_wugen_sc *sc = device_get_softc(dev); | struct omap4_wugen_sc *sc = device_get_softc(dev); | ||||
return (PIC_ALLOC_INTR(sc->sc_parent, isrc, res, data)); | return (PIC_ACTIVATE_INTR(sc->sc_parent, isrc, res, data)); | ||||
} | } | ||||
static void | static void | ||||
omap4_wugen_disable_intr(device_t dev, struct intr_irqsrc *isrc) | omap4_wugen_disable_intr(device_t dev, struct intr_irqsrc *isrc) | ||||
{ | { | ||||
struct omap4_wugen_sc *sc = device_get_softc(dev); | struct omap4_wugen_sc *sc = device_get_softc(dev); | ||||
PIC_DISABLE_INTR(sc->sc_parent, isrc); | PIC_DISABLE_INTR(sc->sc_parent, isrc); | ||||
Show All 12 Lines | omap4_wugen_map_intr(device_t dev, struct intr_map_data *data, | ||||
struct intr_irqsrc **isrcp) | struct intr_irqsrc **isrcp) | ||||
{ | { | ||||
struct omap4_wugen_sc *sc = device_get_softc(dev); | struct omap4_wugen_sc *sc = device_get_softc(dev); | ||||
return (PIC_MAP_INTR(sc->sc_parent, data, isrcp)); | return (PIC_MAP_INTR(sc->sc_parent, data, isrcp)); | ||||
} | } | ||||
static int | static int | ||||
omap4_wugen_release_intr(device_t dev, struct intr_irqsrc *isrc, | omap4_wugen_deactivate_intr(device_t dev, struct intr_irqsrc *isrc, | ||||
struct resource *res, struct intr_map_data *data) | struct resource *res, struct intr_map_data *data) | ||||
{ | { | ||||
struct omap4_wugen_sc *sc = device_get_softc(dev); | struct omap4_wugen_sc *sc = device_get_softc(dev); | ||||
return (PIC_RELEASE_INTR(sc->sc_parent, isrc, res, data)); | return (PIC_DEACTIVATE_INTR(sc->sc_parent, isrc, res, data)); | ||||
} | } | ||||
static int | static int | ||||
omap4_wugen_setup_intr(device_t dev, struct intr_irqsrc *isrc, | omap4_wugen_setup_intr(device_t dev, struct intr_irqsrc *isrc, | ||||
struct resource *res, struct intr_map_data *data) | struct resource *res, struct intr_map_data *data) | ||||
{ | { | ||||
struct omap4_wugen_sc *sc = device_get_softc(dev); | struct omap4_wugen_sc *sc = device_get_softc(dev); | ||||
▲ Show 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
static device_method_t omap4_wugen_methods[] = { | static device_method_t omap4_wugen_methods[] = { | ||||
DEVMETHOD(device_probe, omap4_wugen_probe), | DEVMETHOD(device_probe, omap4_wugen_probe), | ||||
DEVMETHOD(device_attach, omap4_wugen_attach), | DEVMETHOD(device_attach, omap4_wugen_attach), | ||||
DEVMETHOD(device_detach, omap4_wugen_detach), | DEVMETHOD(device_detach, omap4_wugen_detach), | ||||
/* Interrupt controller interface */ | /* Interrupt controller interface */ | ||||
DEVMETHOD(pic_alloc_intr, omap4_wugen_alloc_intr), | DEVMETHOD(pic_activate_intr, omap4_wugen_activate_intr), | ||||
DEVMETHOD(pic_disable_intr, omap4_wugen_disable_intr), | DEVMETHOD(pic_disable_intr, omap4_wugen_disable_intr), | ||||
DEVMETHOD(pic_enable_intr, omap4_wugen_enable_intr), | DEVMETHOD(pic_enable_intr, omap4_wugen_enable_intr), | ||||
DEVMETHOD(pic_map_intr, omap4_wugen_map_intr), | DEVMETHOD(pic_map_intr, omap4_wugen_map_intr), | ||||
DEVMETHOD(pic_release_intr, omap4_wugen_release_intr), | DEVMETHOD(pic_deactivate_intr, omap4_wugen_deactivate_intr), | ||||
DEVMETHOD(pic_setup_intr, omap4_wugen_setup_intr), | DEVMETHOD(pic_setup_intr, omap4_wugen_setup_intr), | ||||
DEVMETHOD(pic_teardown_intr, omap4_wugen_teardown_intr), | DEVMETHOD(pic_teardown_intr, omap4_wugen_teardown_intr), | ||||
DEVMETHOD(pic_pre_ithread, omap4_wugen_pre_ithread), | DEVMETHOD(pic_pre_ithread, omap4_wugen_pre_ithread), | ||||
DEVMETHOD(pic_post_ithread, omap4_wugen_post_ithread), | DEVMETHOD(pic_post_ithread, omap4_wugen_post_ithread), | ||||
DEVMETHOD(pic_post_filter, omap4_wugen_post_filter), | DEVMETHOD(pic_post_filter, omap4_wugen_post_filter), | ||||
#ifdef SMP | #ifdef SMP | ||||
DEVMETHOD(pic_bind_intr, omap4_wugen_bind_intr), | DEVMETHOD(pic_bind_intr, omap4_wugen_bind_intr), | ||||
#endif | #endif | ||||
DEVMETHOD_END | DEVMETHOD_END | ||||
}; | }; | ||||
devclass_t omap4_wugen_devclass; | devclass_t omap4_wugen_devclass; | ||||
DEFINE_CLASS_0(omap4_wugen, omap4_wugen_driver, omap4_wugen_methods, | DEFINE_CLASS_0(omap4_wugen, omap4_wugen_driver, omap4_wugen_methods, | ||||
sizeof(struct omap4_wugen_sc)); | sizeof(struct omap4_wugen_sc)); | ||||
EARLY_DRIVER_MODULE(omap4_wugen, simplebus, omap4_wugen_driver, | EARLY_DRIVER_MODULE(omap4_wugen, simplebus, omap4_wugen_driver, | ||||
omap4_wugen_devclass, NULL, NULL, | omap4_wugen_devclass, NULL, NULL, | ||||
BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE + 1); | BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE + 1); |