Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/pccbb/pccbb.c
Context not available. | |||||
static int cbb_cardbus_deactivate_resource(device_t brdev, | static int cbb_cardbus_deactivate_resource(device_t brdev, | ||||
device_t child, int type, int rid, struct resource *res); | device_t child, int type, int rid, struct resource *res); | ||||
static struct resource *cbb_cardbus_alloc_resource(device_t brdev, | static struct resource *cbb_cardbus_alloc_resource(device_t brdev, | ||||
device_t child, int type, int *rid, u_long start, | device_t child, int type, int *rid, rman_res_t start, | ||||
u_long end, u_long count, u_int flags); | rman_res_t end, rman_res_t count, u_int flags); | ||||
static int cbb_cardbus_release_resource(device_t brdev, device_t child, | static int cbb_cardbus_release_resource(device_t brdev, device_t child, | ||||
int type, int rid, struct resource *res); | int type, int rid, struct resource *res); | ||||
static int cbb_cardbus_power_enable_socket(device_t brdev, | static int cbb_cardbus_power_enable_socket(device_t brdev, | ||||
Context not available. | |||||
while ((rle = SLIST_FIRST(&sc->rl)) != NULL) { | while ((rle = SLIST_FIRST(&sc->rl)) != NULL) { | ||||
device_printf(sc->dev, "Danger Will Robinson: Resource " | device_printf(sc->dev, "Danger Will Robinson: Resource " | ||||
"left allocated! This is a bug... " | "left allocated! This is a bug... " | ||||
"(rid=%x, type=%d, addr=%lx)\n", rle->rid, rle->type, | "(rid=%x, type=%d, addr=%jx)\n", rle->rid, rle->type, | ||||
rman_get_start(rle->res)); | rman_get_start(rle->res)); | ||||
SLIST_REMOVE_HEAD(&sc->rl, link); | SLIST_REMOVE_HEAD(&sc->rl, link); | ||||
free(rle, M_DEVBUF); | free(rle, M_DEVBUF); | ||||
Context not available. | |||||
static struct resource * | static struct resource * | ||||
cbb_cardbus_alloc_resource(device_t brdev, device_t child, int type, | cbb_cardbus_alloc_resource(device_t brdev, device_t child, int type, | ||||
int *rid, u_long start, u_long end, u_long count, u_int flags) | int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) | ||||
{ | { | ||||
struct cbb_softc *sc = device_get_softc(brdev); | struct cbb_softc *sc = device_get_softc(brdev); | ||||
int tmp; | int tmp; | ||||
struct resource *res; | struct resource *res; | ||||
u_long align; | rman_res_t align; | ||||
switch (type) { | switch (type) { | ||||
case SYS_RES_IRQ: | case SYS_RES_IRQ: | ||||
tmp = rman_get_start(sc->irq_res); | tmp = rman_get_start(sc->irq_res); | ||||
if (start > tmp || end < tmp || count != 1) { | if (start > tmp || end < tmp || count != 1) { | ||||
device_printf(child, "requested interrupt %ld-%ld," | device_printf(child, "requested interrupt %jd-%jd," | ||||
"count = %ld not supported by cbb\n", | "count = %jd not supported by cbb\n", | ||||
start, end, count); | start, end, count); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
Context not available. | |||||
static struct resource * | static struct resource * | ||||
cbb_pcic_alloc_resource(device_t brdev, device_t child, int type, int *rid, | cbb_pcic_alloc_resource(device_t brdev, 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 resource *res = NULL; | struct resource *res = NULL; | ||||
struct cbb_softc *sc = device_get_softc(brdev); | struct cbb_softc *sc = device_get_softc(brdev); | ||||
Context not available. | |||||
case SYS_RES_IRQ: | case SYS_RES_IRQ: | ||||
tmp = rman_get_start(sc->irq_res); | tmp = rman_get_start(sc->irq_res); | ||||
if (start > tmp || end < tmp || count != 1) { | if (start > tmp || end < tmp || count != 1) { | ||||
device_printf(child, "requested interrupt %ld-%ld," | device_printf(child, "requested interrupt %jd-%jd," | ||||
"count = %ld not supported by cbb\n", | "count = %jd not supported by cbb\n", | ||||
start, end, count); | start, end, count); | ||||
return (NULL); | return (NULL); | ||||
} | } | ||||
Context not available. | |||||
struct resource * | struct resource * | ||||
cbb_alloc_resource(device_t brdev, device_t child, int type, int *rid, | cbb_alloc_resource(device_t brdev, 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 cbb_softc *sc = device_get_softc(brdev); | struct cbb_softc *sc = device_get_softc(brdev); | ||||
Context not available. |