Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/puc/puc.c
Context not available. | |||||
{ | { | ||||
struct puc_bar *bar; | struct puc_bar *bar; | ||||
struct rman *rm; | struct rman *rm; | ||||
u_long end, start; | rman_res_t end, start; | ||||
int error, i; | int error, i; | ||||
/* Find the BAR entry with the given RID. */ | /* Find the BAR entry with the given RID. */ | ||||
Context not available. | |||||
struct resource * | struct resource * | ||||
puc_bus_alloc_resource(device_t dev, device_t child, int type, int *rid, | puc_bus_alloc_resource(device_t dev, 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 puc_port *port; | struct puc_port *port; | ||||
struct resource *res; | struct resource *res; | ||||
Context not available. | |||||
return (NULL); | return (NULL); | ||||
/* We only support default allocations. */ | /* We only support default allocations. */ | ||||
if (start != 0UL || end != ~0UL) | if (start != 0 || end != ~0) | ||||
return (NULL); | return (NULL); | ||||
if (type == port->p_bar->b_type) | if (type == port->p_bar->b_type) | ||||
Context not available. | |||||
int | int | ||||
puc_bus_get_resource(device_t dev, device_t child, int type, int rid, | puc_bus_get_resource(device_t dev, device_t child, int type, int rid, | ||||
u_long *startp, u_long *countp) | rman_res_t *startp, rman_res_t *countp) | ||||
{ | { | ||||
struct puc_port *port; | struct puc_port *port; | ||||
struct resource *res; | struct resource *res; | ||||
u_long start; | rman_res_t start; | ||||
/* Get our immediate child. */ | /* Get our immediate child. */ | ||||
while (child != NULL && device_get_parent(child) != dev) | while (child != NULL && device_get_parent(child) != dev) | ||||
Context not available. |