Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/mv/mv_pci.c
| Show First 20 Lines • Show All 341 Lines • ▼ Show 20 Lines | |||||
| static int mv_pcib_probe(device_t); | static int mv_pcib_probe(device_t); | ||||
| static int mv_pcib_attach(device_t); | static int mv_pcib_attach(device_t); | ||||
| static struct rman *mv_pcib_get_rman(device_t, int, u_int); | static struct rman *mv_pcib_get_rman(device_t, int, u_int); | ||||
| static struct resource *mv_pcib_alloc_resource(device_t, device_t, int, int *, | static struct resource *mv_pcib_alloc_resource(device_t, device_t, int, int *, | ||||
| rman_res_t, rman_res_t, rman_res_t, u_int); | rman_res_t, rman_res_t, rman_res_t, u_int); | ||||
| static int mv_pcib_adjust_resource(device_t, device_t, struct resource *, | static int mv_pcib_adjust_resource(device_t, device_t, struct resource *, | ||||
| rman_res_t, rman_res_t); | rman_res_t, rman_res_t); | ||||
| static int mv_pcib_release_resource(device_t, device_t, int, int, | static int mv_pcib_release_resource(device_t, device_t, struct resource *); | ||||
| struct resource *); | |||||
| static int mv_pcib_activate_resource(device_t, device_t, struct resource *); | static int mv_pcib_activate_resource(device_t, device_t, struct resource *); | ||||
| static int mv_pcib_deactivate_resource(device_t, device_t, struct resource *); | static int mv_pcib_deactivate_resource(device_t, device_t, struct resource *); | ||||
| static int mv_pcib_map_resource(device_t, device_t, struct resource *, | static int mv_pcib_map_resource(device_t, device_t, struct resource *, | ||||
| struct resource_map_request *, struct resource_map *); | struct resource_map_request *, struct resource_map *); | ||||
| static int mv_pcib_unmap_resource(device_t, device_t, struct resource *, | static int mv_pcib_unmap_resource(device_t, device_t, struct resource *, | ||||
| struct resource_map *); | struct resource_map *); | ||||
| static int mv_pcib_read_ivar(device_t, device_t, int, uintptr_t *); | static int mv_pcib_read_ivar(device_t, device_t, int, uintptr_t *); | ||||
| static int mv_pcib_write_ivar(device_t, device_t, int, uintptr_t); | static int mv_pcib_write_ivar(device_t, device_t, int, uintptr_t); | ||||
| ▲ Show 20 Lines • Show All 597 Lines • ▼ Show 20 Lines | return (pci_domain_adjust_bus(sc->ap_segment, child, r, start, | ||||
| end)); | end)); | ||||
| #endif | #endif | ||||
| default: | default: | ||||
| return (bus_generic_adjust_resource(dev, child, r, start, end)); | return (bus_generic_adjust_resource(dev, child, r, start, end)); | ||||
| } | } | ||||
| } | } | ||||
| static int | static int | ||||
| mv_pcib_release_resource(device_t dev, device_t child, int type, int rid, | mv_pcib_release_resource(device_t dev, device_t child, struct resource *res) | ||||
| struct resource *res) | |||||
| { | { | ||||
| #ifdef PCI_RES_BUS | #ifdef PCI_RES_BUS | ||||
| struct mv_pcib_softc *sc = device_get_softc(dev); | struct mv_pcib_softc *sc = device_get_softc(dev); | ||||
| #endif | #endif | ||||
| switch (type) { | switch (rman_get_type(res)) { | ||||
| case SYS_RES_IOPORT: | case SYS_RES_IOPORT: | ||||
| case SYS_RES_MEMORY: | case SYS_RES_MEMORY: | ||||
| return (bus_generic_rman_release_resource(dev, child, type, | return (bus_generic_rman_release_resource(dev, child, res)); | ||||
| rid, res)); | |||||
| #ifdef PCI_RES_BUS | #ifdef PCI_RES_BUS | ||||
| case PCI_RES_BUS: | case PCI_RES_BUS: | ||||
| return (pci_domain_release_bus(sc->ap_segment, child, rid, res)); | return (pci_domain_release_bus(sc->ap_segment, child, res)); | ||||
| #endif | #endif | ||||
| default: | default: | ||||
| return (BUS_RELEASE_RESOURCE(device_get_parent(dev), child, | return (bus_generic_release_resource(dev, child, res)); | ||||
| type, rid, res)); | |||||
| } | } | ||||
| } | } | ||||
| static int | static int | ||||
| mv_pcib_activate_resource(device_t dev, device_t child, struct resource *r) | mv_pcib_activate_resource(device_t dev, device_t child, struct resource *r) | ||||
| { | { | ||||
| #ifdef PCI_RES_BUS | #ifdef PCI_RES_BUS | ||||
| struct mv_pcib_softc *sc = device_get_softc(dev); | struct mv_pcib_softc *sc = device_get_softc(dev); | ||||
| ▲ Show 20 Lines • Show All 412 Lines • Show Last 20 Lines | |||||