Changeset View
Changeset View
Standalone View
Standalone View
sys/powerpc/powermac/uninorth.c
| Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | static int unin_chip_activate_resource(device_t, device_t, | ||||
| struct resource *); | struct resource *); | ||||
| static int unin_chip_deactivate_resource(device_t, device_t, | static int unin_chip_deactivate_resource(device_t, device_t, | ||||
| struct resource *); | struct resource *); | ||||
| static int unin_chip_map_resource(device_t, device_t, struct resource *, | static int unin_chip_map_resource(device_t, device_t, struct resource *, | ||||
| struct resource_map_request *, | struct resource_map_request *, | ||||
| struct resource_map *); | struct resource_map *); | ||||
| static int unin_chip_unmap_resource(device_t, device_t, struct resource *, | static int unin_chip_unmap_resource(device_t, device_t, struct resource *, | ||||
| struct resource_map *); | struct resource_map *); | ||||
| static int unin_chip_release_resource(device_t, device_t, int, int, | static int unin_chip_release_resource(device_t, device_t, struct resource *); | ||||
| struct resource *); | |||||
| static struct resource_list *unin_chip_get_resource_list (device_t, device_t); | static struct resource_list *unin_chip_get_resource_list (device_t, device_t); | ||||
| /* | /* | ||||
| * OFW Bus interface | * OFW Bus interface | ||||
| */ | */ | ||||
| static ofw_bus_get_devinfo_t unin_chip_get_devinfo; | static ofw_bus_get_devinfo_t unin_chip_get_devinfo; | ||||
| ▲ Show 20 Lines • Show All 465 Lines • ▼ Show 20 Lines | unin_chip_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 | ||||
| unin_chip_release_resource(device_t bus, device_t child, int type, int rid, | unin_chip_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 | ||||
| unin_chip_activate_resource(device_t bus, device_t child, struct resource *res) | unin_chip_activate_resource(device_t bus, device_t child, struct resource *res) | ||||
| { | { | ||||
| ▲ Show 20 Lines • Show All 131 Lines • Show Last 20 Lines | |||||