Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ichsmb/ichsmb_pci.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
sc->dev = dev; | sc->dev = dev; | ||||
/* Allocate an I/O range */ | /* Allocate an I/O range */ | ||||
sc->io_rid = ICH_SMB_BASE; | sc->io_rid = ICH_SMB_BASE; | ||||
sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT, | sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT, | ||||
&sc->io_rid, 0, ~0, 16, RF_ACTIVE); | &sc->io_rid, 0, ~0, 16, RF_ACTIVE); | ||||
if (sc->io_res == NULL) | if (sc->io_res == NULL) | ||||
sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT, | sc->io_res = bus_alloc_resource(dev, SYS_RES_IOPORT, | ||||
&sc->io_rid, 0ul, ~0ul, 32, RF_ACTIVE); | &sc->io_rid, 0, ~0, 32, RF_ACTIVE); | ||||
if (sc->io_res == NULL) { | if (sc->io_res == NULL) { | ||||
device_printf(dev, "can't map I/O\n"); | device_printf(dev, "can't map I/O\n"); | ||||
error = ENXIO; | error = ENXIO; | ||||
goto fail; | goto fail; | ||||
} | } | ||||
/* Allocate interrupt */ | /* Allocate interrupt */ | ||||
sc->irq_rid = 0; | sc->irq_rid = 0; | ||||
Show All 27 Lines |