Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/pccbb/pccbb_pci.c
Show First 20 Lines • Show All 307 Lines • ▼ Show 20 Lines | #endif | ||||
rid = CBBR_SOCKBASE; | rid = CBBR_SOCKBASE; | ||||
sc->base_res = bus_alloc_resource_any(brdev, SYS_RES_MEMORY, &rid, | sc->base_res = bus_alloc_resource_any(brdev, SYS_RES_MEMORY, &rid, | ||||
RF_ACTIVE); | RF_ACTIVE); | ||||
if (!sc->base_res) { | if (!sc->base_res) { | ||||
device_printf(brdev, "Could not map register memory\n"); | device_printf(brdev, "Could not map register memory\n"); | ||||
mtx_destroy(&sc->mtx); | mtx_destroy(&sc->mtx); | ||||
return (ENOMEM); | return (ENOMEM); | ||||
} else { | } else { | ||||
DEVPRINTF((brdev, "Found memory at %08lx\n", | DEVPRINTF((brdev, "Found memory at %jx\n", | ||||
rman_get_start(sc->base_res))); | rman_get_start(sc->base_res))); | ||||
} | } | ||||
sc->bst = rman_get_bustag(sc->base_res); | sc->bst = rman_get_bustag(sc->base_res); | ||||
sc->bsh = rman_get_bushandle(sc->base_res); | sc->bsh = rman_get_bushandle(sc->base_res); | ||||
exca_init(&sc->exca[0], brdev, sc->bst, sc->bsh, CBB_EXCA_OFFSET); | exca_init(&sc->exca[0], brdev, sc->bst, sc->bsh, CBB_EXCA_OFFSET); | ||||
sc->exca[0].flags |= EXCA_HAS_MEMREG_WIN; | sc->exca[0].flags |= EXCA_HAS_MEMREG_WIN; | ||||
sc->exca[0].chipset = EXCA_CARDBUS; | sc->exca[0].chipset = EXCA_CARDBUS; | ||||
▲ Show 20 Lines • Show All 644 Lines • Show Last 20 Lines |