Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/powermac/macio.c
Show First 20 Lines • Show All 78 Lines • ▼ Show 20 Lines | |||||
static int macio_probe(device_t); | static int macio_probe(device_t); | ||||
static int macio_attach(device_t); | static int macio_attach(device_t); | ||||
static int macio_print_child(device_t dev, device_t child); | static int macio_print_child(device_t dev, device_t child); | ||||
static void macio_probe_nomatch(device_t, device_t); | static void macio_probe_nomatch(device_t, device_t); | ||||
static struct rman *macio_get_rman(device_t, int, u_int); | static struct rman *macio_get_rman(device_t, int, u_int); | ||||
static struct resource *macio_alloc_resource(device_t, device_t, int, int *, | static struct resource *macio_alloc_resource(device_t, device_t, int, int *, | ||||
rman_res_t, rman_res_t, rman_res_t, | rman_res_t, rman_res_t, rman_res_t, | ||||
u_int); | u_int); | ||||
static int macio_adjust_resource(device_t, device_t, int, struct resource *, | static int macio_adjust_resource(device_t, device_t, struct resource *, | ||||
rman_res_t, rman_res_t); | rman_res_t, rman_res_t); | ||||
static int macio_activate_resource(device_t, device_t, int, int, | static int macio_activate_resource(device_t, device_t, int, int, | ||||
struct resource *); | struct resource *); | ||||
static int macio_deactivate_resource(device_t, device_t, int, int, | static int macio_deactivate_resource(device_t, device_t, int, int, | ||||
struct resource *); | struct resource *); | ||||
static int macio_release_resource(device_t, device_t, int, int, | static int macio_release_resource(device_t, device_t, int, int, | ||||
struct resource *); | struct resource *); | ||||
static int macio_map_resource(device_t, device_t, int, struct resource *, | static int macio_map_resource(device_t, device_t, int, struct resource *, | ||||
▲ Show 20 Lines • Show All 495 Lines • ▼ Show 20 Lines | macio_alloc_resource(device_t bus, device_t child, int type, int *rid, | ||||
default: | default: | ||||
device_printf(bus, "unknown resource request from %s\n", | device_printf(bus, "unknown resource request from %s\n", | ||||
device_get_nameunit(child)); | device_get_nameunit(child)); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
} | } | ||||
static int | static int | ||||
macio_adjust_resource(device_t bus, device_t child, int type, | macio_adjust_resource(device_t bus, device_t child, struct resource *r, | ||||
struct resource *r, rman_res_t start, rman_res_t end) | rman_res_t start, rman_res_t end) | ||||
{ | { | ||||
switch (type) { | switch (rman_get_type(r)) { | ||||
case SYS_RES_IOPORT: | case SYS_RES_IOPORT: | ||||
case SYS_RES_MEMORY: | case SYS_RES_MEMORY: | ||||
return (bus_generic_rman_adjust_resource(bus, child, type, r, | return (bus_generic_rman_adjust_resource(bus, child, r, start, | ||||
start, end)); | |||||
case SYS_RES_IRQ: | |||||
return (bus_generic_adjust_resource(bus, child, type, r, start, | |||||
end)); | end)); | ||||
case SYS_RES_IRQ: | |||||
return (bus_generic_adjust_resource(bus, child, r, start, end)); | |||||
default: | default: | ||||
return (EINVAL); | return (EINVAL); | ||||
} | } | ||||
} | } | ||||
static int | static int | ||||
macio_release_resource(device_t bus, device_t child, int type, int rid, | macio_release_resource(device_t bus, device_t child, int type, int rid, | ||||
struct resource *res) | struct resource *res) | ||||
▲ Show 20 Lines • Show All 184 Lines • Show Last 20 Lines |