Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/digi/digi_isa.c
Context not available. | |||||
/* Temporarily map our io ports */ | /* Temporarily map our io ports */ | ||||
sc->res.iorid = 0; | sc->res.iorid = 0; | ||||
sc->res.io = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->res.iorid, | sc->res.io = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->res.iorid, | ||||
0ul, ~0ul, IO_SIZE, RF_ACTIVE); | 0, ~0, IO_SIZE, RF_ACTIVE); | ||||
if (sc->res.io == NULL) | if (sc->res.io == NULL) | ||||
return (ENXIO); | return (ENXIO); | ||||
Context not available. | |||||
/* Temporarily map our memory */ | /* Temporarily map our memory */ | ||||
sc->res.mrid = 0; | sc->res.mrid = 0; | ||||
sc->res.mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->res.mrid, | sc->res.mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->res.mrid, | ||||
0ul, ~0ul, sc->win_size, 0); | 0, ~0, sc->win_size, 0); | ||||
if (sc->res.mem == NULL) { | if (sc->res.mem == NULL) { | ||||
device_printf(dev, "0x%lx: Memory range is in use\n", sc->pmem); | device_printf(dev, "0x%lx: Memory range is in use\n", sc->pmem); | ||||
bus_release_resource(dev, SYS_RES_IOPORT, sc->res.iorid, | bus_release_resource(dev, SYS_RES_IOPORT, sc->res.iorid, | ||||
Context not available. | |||||
/* Allocate resources (verified in digi_isa_probe()) */ | /* Allocate resources (verified in digi_isa_probe()) */ | ||||
sc->res.iorid = 0; | sc->res.iorid = 0; | ||||
sc->res.io = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->res.iorid, | sc->res.io = bus_alloc_resource(dev, SYS_RES_IOPORT, &sc->res.iorid, | ||||
0ul, ~0ul, iosize, RF_ACTIVE); | 0, ~0, iosize, RF_ACTIVE); | ||||
if (sc->res.io == NULL) | if (sc->res.io == NULL) | ||||
return (ENXIO); | return (ENXIO); | ||||
Context not available. | |||||
sc->res.mrid = 0; | sc->res.mrid = 0; | ||||
sc->res.mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->res.mrid, | sc->res.mem = bus_alloc_resource(dev, SYS_RES_MEMORY, &sc->res.mrid, | ||||
0ul, ~0ul, msize, RF_ACTIVE); | 0, ~0, msize, RF_ACTIVE); | ||||
if (sc->res.mem == NULL) { | if (sc->res.mem == NULL) { | ||||
device_printf(dev, "0x%lx: Memory range is in use\n", sc->pmem); | device_printf(dev, "0x%lx: Memory range is in use\n", sc->pmem); | ||||
sc->hidewin(sc); | sc->hidewin(sc); | ||||
Context not available. |