Changeset View
Changeset View
Standalone View
Standalone View
sys/arm64/cavium/thunder_pcie_fdt.c
| Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | |||||
| #include "thunder_pcie_common.h" | #include "thunder_pcie_common.h" | ||||
| #include "pcib_if.h" | #include "pcib_if.h" | ||||
| #ifdef THUNDERX_PASS_1_1_ERRATA | #ifdef THUNDERX_PASS_1_1_ERRATA | ||||
| static struct resource * thunder_pcie_fdt_alloc_resource(device_t, device_t, | static struct resource * thunder_pcie_fdt_alloc_resource(device_t, device_t, | ||||
| int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); | int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); | ||||
| static int thunder_pcie_fdt_release_resource(device_t, device_t, | static int thunder_pcie_fdt_release_resource(device_t, device_t, | ||||
| int, int, struct resource*); | struct resource*); | ||||
| #endif | #endif | ||||
| static int thunder_pcie_fdt_attach(device_t); | static int thunder_pcie_fdt_attach(device_t); | ||||
| static int thunder_pcie_fdt_probe(device_t); | static int thunder_pcie_fdt_probe(device_t); | ||||
| static int thunder_pcie_fdt_get_id(device_t, device_t, enum pci_id_type, | static int thunder_pcie_fdt_get_id(device_t, device_t, enum pci_id_type, | ||||
| uintptr_t *); | uintptr_t *); | ||||
| static const struct ofw_bus_devinfo *thunder_pcie_ofw_get_devinfo(device_t, | static const struct ofw_bus_devinfo *thunder_pcie_ofw_get_devinfo(device_t, | ||||
| device_t); | device_t); | ||||
| ▲ Show 20 Lines • Show All 214 Lines • ▼ Show 20 Lines | if (type == SYS_RES_MEMORY) { | ||||
| } | } | ||||
| } | } | ||||
| return (bus_generic_alloc_resource(dev, child, type, rid, start, | return (bus_generic_alloc_resource(dev, child, type, rid, start, | ||||
| end, count, flags)); | end, count, flags)); | ||||
| } | } | ||||
| static int | static int | ||||
| thunder_pcie_fdt_release_resource(device_t dev, device_t child, int type, | thunder_pcie_fdt_release_resource(device_t dev, device_t child, | ||||
| int rid, struct resource *res) | struct resource *res) | ||||
| { | { | ||||
| if ((int)ofw_bus_get_node(child) <= 0) | if ((int)ofw_bus_get_node(child) <= 0) | ||||
| return (pci_host_generic_core_release_resource(dev, child, type, | return (pci_host_generic_core_release_resource(dev, child, | ||||
| rid, res)); | res)); | ||||
| return (bus_generic_release_resource(dev, child, type, rid, res)); | return (bus_generic_release_resource(dev, child, res)); | ||||
| } | } | ||||
| #endif | #endif | ||||