Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/cm/if_cm_isa.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
cm_isa_probe(dev) | cm_isa_probe(dev) | ||||
device_t dev; | device_t dev; | ||||
{ | { | ||||
struct cm_softc *sc = device_get_softc(dev); | struct cm_softc *sc = device_get_softc(dev); | ||||
int rid; | int rid; | ||||
rid = 0; | rid = 0; | ||||
sc->port_res = bus_alloc_resource( | sc->port_res = bus_alloc_resource( | ||||
dev, SYS_RES_IOPORT, &rid, 0ul, ~0ul, CM_IO_PORTS, RF_ACTIVE); | dev, SYS_RES_IOPORT, &rid, 0, ~0, CM_IO_PORTS, RF_ACTIVE); | ||||
if (sc->port_res == NULL) | if (sc->port_res == NULL) | ||||
return (ENOENT); | return (ENOENT); | ||||
if (GETREG(CMSTAT) == 0xff) { | if (GETREG(CMSTAT) == 0xff) { | ||||
cm_release_resources(dev); | cm_release_resources(dev); | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
rid = 0; | rid = 0; | ||||
sc->mem_res = bus_alloc_resource( | sc->mem_res = bus_alloc_resource( | ||||
dev, SYS_RES_MEMORY, &rid, 0ul, ~0ul, CM_MEM_SIZE, RF_ACTIVE); | dev, SYS_RES_MEMORY, &rid, 0, ~0, CM_MEM_SIZE, RF_ACTIVE); | ||||
if (sc->mem_res == NULL) { | if (sc->mem_res == NULL) { | ||||
cm_release_resources(dev); | cm_release_resources(dev); | ||||
return (ENOENT); | return (ENOENT); | ||||
} | } | ||||
rid = 0; | rid = 0; | ||||
sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); | sc->irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_ACTIVE); | ||||
if (sc->irq_res == NULL) { | if (sc->irq_res == NULL) { | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |