Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sparc64/pci/ofw_pci.c
Show First 20 Lines • Show All 281 Lines • ▼ Show 20 Lines | case PCIB_IVAR_BUS: | ||||
*result = sc->sc_pci_secbus; | *result = sc->sc_pci_secbus; | ||||
return (0); | return (0); | ||||
} | } | ||||
return (ENOENT); | return (ENOENT); | ||||
} | } | ||||
struct resource * | struct resource * | ||||
ofw_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, | ofw_pci_alloc_resource(device_t bus, device_t child, int type, int *rid, | ||||
u_long start, u_long end, u_long count, u_int flags) | rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) | ||||
{ | { | ||||
struct ofw_pci_softc *sc; | struct ofw_pci_softc *sc; | ||||
struct resource *rv; | struct resource *rv; | ||||
struct rman *rm; | struct rman *rm; | ||||
sc = device_get_softc(bus); | sc = device_get_softc(bus); | ||||
switch (type) { | switch (type) { | ||||
case SYS_RES_IRQ: | case SYS_RES_IRQ: | ||||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | rman_set_bushandle(r, sc->sc_pci_bh[OFW_PCI_CS_IO] + | ||||
rman_get_start(r)); | rman_get_start(r)); | ||||
break; | break; | ||||
} | } | ||||
return (rman_activate_resource(r)); | return (rman_activate_resource(r)); | ||||
} | } | ||||
int | int | ||||
ofw_pci_adjust_resource(device_t bus, device_t child, int type, | ofw_pci_adjust_resource(device_t bus, device_t child, int type, | ||||
struct resource *r, u_long start, u_long end) | struct resource *r, rman_res_t start, rman_res_t end) | ||||
{ | { | ||||
struct ofw_pci_softc *sc; | struct ofw_pci_softc *sc; | ||||
struct rman *rm; | struct rman *rm; | ||||
sc = device_get_softc(bus); | sc = device_get_softc(bus); | ||||
switch (type) { | switch (type) { | ||||
case SYS_RES_IRQ: | case SYS_RES_IRQ: | ||||
return (bus_generic_adjust_resource(bus, child, type, r, | return (bus_generic_adjust_resource(bus, child, type, r, | ||||
Show All 33 Lines |