Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/amdsbwd/amdsbwd.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
rc = bus_set_resource(dev, SYS_RES_IOPORT, 0, AMDSB_PMIO_INDEX, | rc = bus_set_resource(dev, SYS_RES_IOPORT, 0, AMDSB_PMIO_INDEX, | ||||
AMDSB_PMIO_WIDTH); | AMDSB_PMIO_WIDTH); | ||||
if (rc != 0) { | if (rc != 0) { | ||||
device_printf(dev, "bus_set_resource for IO failed\n"); | device_printf(dev, "bus_set_resource for IO failed\n"); | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
rid = 0; | rid = 0; | ||||
res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0ul, ~0ul, | res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, 0, ~0, | ||||
AMDSB_PMIO_WIDTH, RF_ACTIVE | RF_SHAREABLE); | AMDSB_PMIO_WIDTH, RF_ACTIVE | RF_SHAREABLE); | ||||
if (res == NULL) { | if (res == NULL) { | ||||
device_printf(dev, "bus_alloc_resource for IO failed\n"); | device_printf(dev, "bus_alloc_resource for IO failed\n"); | ||||
return (ENXIO); | return (ENXIO); | ||||
} | } | ||||
smb_dev = pci_find_bsf(0, 20, 0); | smb_dev = pci_find_bsf(0, 20, 0); | ||||
KASSERT(smb_dev != NULL, ("can't find SMBus PCI device\n")); | KASSERT(smb_dev != NULL, ("can't find SMBus PCI device\n")); | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |