Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/powermac/macio.c
| Show First 20 Lines • Show All 82 Lines • ▼ Show 20 Lines | |||||
| 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, 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, struct resource *); | static int macio_activate_resource(device_t, device_t, struct resource *); | ||||
| static int macio_deactivate_resource(device_t, device_t, struct resource *); | static int macio_deactivate_resource(device_t, device_t, struct resource *); | ||||
| static int macio_release_resource(device_t, device_t, int, int, | static int macio_release_resource(device_t, device_t, struct resource *); | ||||
| struct resource *); | |||||
| static int macio_map_resource(device_t, device_t, struct resource *, | static int macio_map_resource(device_t, device_t, struct resource *, | ||||
| struct resource_map_request *, | struct resource_map_request *, | ||||
| struct resource_map *); | struct resource_map *); | ||||
| static int macio_unmap_resource(device_t, device_t, struct resource *, | static int macio_unmap_resource(device_t, device_t, struct resource *, | ||||
| struct resource_map *); | struct resource_map *); | ||||
| static struct resource_list *macio_get_resource_list (device_t, device_t); | static struct resource_list *macio_get_resource_list (device_t, device_t); | ||||
| static ofw_bus_get_devinfo_t macio_get_devinfo; | static ofw_bus_get_devinfo_t macio_get_devinfo; | ||||
| #if !defined(__powerpc64__) && defined(SMP) | #if !defined(__powerpc64__) && defined(SMP) | ||||
| ▲ Show 20 Lines • Show All 504 Lines • ▼ Show 20 Lines | macio_adjust_resource(device_t bus, device_t child, struct resource *r, | ||||
| case SYS_RES_IRQ: | case SYS_RES_IRQ: | ||||
| return (bus_generic_adjust_resource(bus, child, r, start, end)); | 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, struct resource *res) | ||||
| struct resource *res) | |||||
| { | { | ||||
| switch (type) { | switch (rman_get_type(res)) { | ||||
| case SYS_RES_IOPORT: | case SYS_RES_IOPORT: | ||||
| case SYS_RES_MEMORY: | case SYS_RES_MEMORY: | ||||
| return (bus_generic_rman_release_resource(bus, child, type, rid, | return (bus_generic_rman_release_resource(bus, child, res)); | ||||
| res)); | |||||
| case SYS_RES_IRQ: | case SYS_RES_IRQ: | ||||
| return (bus_generic_rl_release_resource(bus, child, type, rid, | return (bus_generic_rl_release_resource(bus, child, res)); | ||||
| res)); | |||||
| default: | default: | ||||
| return (EINVAL); | return (EINVAL); | ||||
| } | } | ||||
| } | } | ||||
| static int | static int | ||||
| macio_activate_resource(device_t bus, device_t child, struct resource *res) | macio_activate_resource(device_t bus, device_t child, struct resource *res) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines | |||||