Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/fb/s3_pci.c
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
printf("%s: driver already attached!\n", __func__); | printf("%s: driver already attached!\n", __func__); | ||||
goto error; | goto error; | ||||
} | } | ||||
/* Allocate resources | /* Allocate resources | ||||
*/ | */ | ||||
rid = 0; | rid = 0; | ||||
if (!(sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, | if (!(sc->port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, | ||||
0ul, ~0ul, 0, RF_ACTIVE | RF_SHAREABLE))) { | 0, ~0, 0, RF_ACTIVE | RF_SHAREABLE))) { | ||||
printf("%s: port resource allocation failed!\n", __func__); | printf("%s: port resource allocation failed!\n", __func__); | ||||
goto error; | goto error; | ||||
} | } | ||||
sc->st = rman_get_bustag(sc->port_res); | sc->st = rman_get_bustag(sc->port_res); | ||||
sc->sh = rman_get_bushandle(sc->port_res); | sc->sh = rman_get_bushandle(sc->port_res); | ||||
rid = 1; | rid = 1; | ||||
if (!(sc->enh_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, | if (!(sc->enh_res = bus_alloc_resource(dev, SYS_RES_IOPORT, &rid, | ||||
0ul, ~0ul, 0, RF_ACTIVE | RF_SHAREABLE))) { | 0, ~0, 0, RF_ACTIVE | RF_SHAREABLE))) { | ||||
printf("%s: enhanced port resource allocation failed!\n", | printf("%s: enhanced port resource allocation failed!\n", | ||||
__func__); | __func__); | ||||
goto error; | goto error; | ||||
} | } | ||||
sc->enh_st = rman_get_bustag(sc->enh_res); | sc->enh_st = rman_get_bustag(sc->enh_res); | ||||
sc->enh_sh = rman_get_bushandle(sc->enh_res); | sc->enh_sh = rman_get_bushandle(sc->enh_res); | ||||
rid = PCI_BASE_MEMORY; | rid = PCI_BASE_MEMORY; | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |