Changeset View
Changeset View
Standalone View
Standalone View
head/sys/powerpc/powermac/macgpio.c
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | |||||
static MALLOC_DEFINE(M_MACGPIO, "macgpio", "macgpio device information"); | static MALLOC_DEFINE(M_MACGPIO, "macgpio", "macgpio device information"); | ||||
static int macgpio_probe(device_t); | static int macgpio_probe(device_t); | ||||
static int macgpio_attach(device_t); | static int macgpio_attach(device_t); | ||||
static int macgpio_print_child(device_t dev, device_t child); | static int macgpio_print_child(device_t dev, device_t child); | ||||
static void macgpio_probe_nomatch(device_t, device_t); | static void macgpio_probe_nomatch(device_t, device_t); | ||||
static struct resource *macgpio_alloc_resource(device_t, device_t, int, int *, | static struct resource *macgpio_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 macgpio_activate_resource(device_t, device_t, int, int, | static int macgpio_activate_resource(device_t, device_t, int, int, | ||||
struct resource *); | struct resource *); | ||||
static int macgpio_deactivate_resource(device_t, device_t, int, int, | static int macgpio_deactivate_resource(device_t, device_t, int, int, | ||||
struct resource *); | struct resource *); | ||||
static ofw_bus_get_devinfo_t macgpio_get_devinfo; | static ofw_bus_get_devinfo_t macgpio_get_devinfo; | ||||
static int macgpio_suspend(device_t dev); | static int macgpio_suspend(device_t dev); | ||||
static int macgpio_resume(device_t dev); | static int macgpio_resume(device_t dev); | ||||
▲ Show 20 Lines • Show All 179 Lines • ▼ Show 20 Lines | resource_list_print_type(&dinfo->mdi_resources, "irq", | ||||
SYS_RES_IRQ, "%ld"); | SYS_RES_IRQ, "%ld"); | ||||
printf(" (no driver attached)\n"); | printf(" (no driver attached)\n"); | ||||
} | } | ||||
} | } | ||||
static struct resource * | static struct resource * | ||||
macgpio_alloc_resource(device_t bus, device_t child, int type, int *rid, | macgpio_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 macgpio_devinfo *dinfo; | struct macgpio_devinfo *dinfo; | ||||
dinfo = device_get_ivars(child); | dinfo = device_get_ivars(child); | ||||
if (type != SYS_RES_IRQ) | if (type != SYS_RES_IRQ) | ||||
return (NULL); | return (NULL); | ||||
▲ Show 20 Lines • Show All 125 Lines • Show Last 20 Lines |