Changeset View
Changeset View
Standalone View
Standalone View
sys/mips/beri/beri_simplebus.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
static int simplebus_setup_intr(device_t, device_t, struct resource *, int, | static int simplebus_setup_intr(device_t, device_t, struct resource *, int, | ||||
driver_filter_t *, driver_intr_t *, void *, void **); | driver_filter_t *, driver_intr_t *, void *, void **); | ||||
static int simplebus_teardown_intr(device_t, device_t, struct resource *, | static int simplebus_teardown_intr(device_t, device_t, struct resource *, | ||||
void *); | void *); | ||||
static int simplebus_activate_resource(device_t, device_t, int, int, | static int simplebus_activate_resource(device_t, device_t, int, int, | ||||
struct resource *); | struct resource *); | ||||
static struct resource *simplebus_alloc_resource(device_t, device_t, int, | static struct resource *simplebus_alloc_resource(device_t, device_t, int, | ||||
int *, u_long, u_long, u_long, u_int); | int *, rman_res_t, rman_res_t, rman_res_t, u_int); | ||||
static int simplebus_deactivate_resource(device_t, device_t, int, int, | static int simplebus_deactivate_resource(device_t, device_t, int, int, | ||||
struct resource *); | struct resource *); | ||||
static int simplebus_release_resource(device_t, device_t, int, int, | static int simplebus_release_resource(device_t, device_t, int, int, | ||||
struct resource *); | struct resource *); | ||||
static device_t simplebus_get_interrupt_parent(device_t); | static device_t simplebus_get_interrupt_parent(device_t); | ||||
static struct resource_list *simplebus_get_resource_list(device_t, device_t); | static struct resource_list *simplebus_get_resource_list(device_t, device_t); | ||||
static ofw_bus_get_devinfo_t simplebus_get_devinfo; | static ofw_bus_get_devinfo_t simplebus_get_devinfo; | ||||
▲ Show 20 Lines • Show All 84 Lines • ▼ Show 20 Lines | |||||
rv += printf(" (%s)", device_get_nameunit(ip)); | rv += printf(" (%s)", device_get_nameunit(ip)); | ||||
rv += bus_print_child_footer(dev, child); | rv += bus_print_child_footer(dev, child); | ||||
return (rv); | return (rv); | ||||
} | } | ||||
static struct resource * | static struct resource * | ||||
simplebus_alloc_resource(device_t bus, device_t child, int type, int *rid, | simplebus_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) | ||||
{ | { | ||||
device_t ic; | device_t ic; | ||||
struct simplebus_devinfo *di; | struct simplebus_devinfo *di; | ||||
struct resource_list_entry *rle; | struct resource_list_entry *rle; | ||||
/* | /* | ||||
* Request for the default allocation with a given rid: use resource | * Request for the default allocation with a given rid: use resource | ||||
* list stored in the local device info. | * list stored in the local device info. | ||||
*/ | */ | ||||
if ((start == 0UL) && (end == ~0UL)) { | if ((start == 0) && (end == ~0)) { | ||||
if ((di = device_get_ivars(child)) == NULL) | if ((di = device_get_ivars(child)) == NULL) | ||||
return (NULL); | return (NULL); | ||||
if (type == SYS_RES_IOPORT) | if (type == SYS_RES_IOPORT) | ||||
type = SYS_RES_MEMORY; | type = SYS_RES_MEMORY; | ||||
rle = resource_list_find(&di->di_res, type, *rid); | rle = resource_list_find(&di->di_res, type, *rid); | ||||
if (rle == NULL) { | if (rle == NULL) { | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |