Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/mips/cpu.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
static devclass_t cpu_devclass; | static devclass_t cpu_devclass; | ||||
/* | /* | ||||
* Device methods | * Device methods | ||||
*/ | */ | ||||
static int cpu_probe(device_t); | static int cpu_probe(device_t); | ||||
static int cpu_attach(device_t); | static int cpu_attach(device_t); | ||||
static struct resource *cpu_alloc_resource(device_t, device_t, int, int *, | static struct resource *cpu_alloc_resource(device_t, device_t, int, int *, | ||||
u_long, u_long, u_long, u_int); | rman_res_t, rman_res_t, rman_res_t, | ||||
u_int); | |||||
static int cpu_setup_intr(device_t, device_t, struct resource *, int, | static int cpu_setup_intr(device_t, device_t, struct resource *, int, | ||||
driver_filter_t *f, driver_intr_t *, void *, | driver_filter_t *f, driver_intr_t *, void *, | ||||
void **); | void **); | ||||
static device_method_t cpu_methods[] = { | static device_method_t cpu_methods[] = { | ||||
/* Device interface */ | /* Device interface */ | ||||
DEVMETHOD(device_probe, cpu_probe), | DEVMETHOD(device_probe, cpu_probe), | ||||
DEVMETHOD(device_attach, cpu_attach), | DEVMETHOD(device_attach, cpu_attach), | ||||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | |||||
device_printf(dev, "clock failed to attach"); | device_printf(dev, "clock failed to attach"); | ||||
#endif | #endif | ||||
return (bus_generic_attach(dev)); | return (bus_generic_attach(dev)); | ||||
} | } | ||||
static struct resource * | static struct resource * | ||||
cpu_alloc_resource(device_t dev, device_t child, int type, int *rid, | cpu_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 resource *res; | struct resource *res; | ||||
if (type != SYS_RES_IRQ) | if (type != SYS_RES_IRQ) | ||||
return (NULL); | return (NULL); | ||||
res = rman_reserve_resource(&cpu_hardirq_rman, start, end, count, 0, | res = rman_reserve_resource(&cpu_hardirq_rman, start, end, count, 0, | ||||
child); | child); | ||||
return (res); | return (res); | ||||
Show All 25 Lines |