Changeset View
Changeset View
Standalone View
Standalone View
sys/arm/nvidia/tegra_pcie.c
Show First 20 Lines • Show All 1,527 Lines • ▼ Show 20 Lines | sc->msi_irq_res = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, | ||||
RF_ACTIVE); | RF_ACTIVE); | ||||
if (sc->irq_res == NULL) { | if (sc->irq_res == NULL) { | ||||
device_printf(dev, "Cannot allocate MSI IRQ resources\n"); | device_printf(dev, "Cannot allocate MSI IRQ resources\n"); | ||||
rv = ENXIO; | rv = ENXIO; | ||||
goto out; | goto out; | ||||
} | } | ||||
sc->ofw_pci.sc_range_mask = 0x3; | sc->ofw_pci.sc_range_mask = 0x3; | ||||
rv = ofw_pci_init(dev); | rv = ofw_pcib_init(dev); | ||||
if (rv != 0) | if (rv != 0) | ||||
goto out; | goto out; | ||||
rv = tegra_pcib_decode_ranges(sc, sc->ofw_pci.sc_range, | rv = tegra_pcib_decode_ranges(sc, sc->ofw_pci.sc_range, | ||||
sc->ofw_pci.sc_nrange); | sc->ofw_pci.sc_nrange); | ||||
if (rv != 0) | if (rv != 0) | ||||
goto out; | goto out; | ||||
▲ Show 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | #endif | ||||
DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), | DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), | ||||
DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), | DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), | ||||
DEVMETHOD_END | DEVMETHOD_END | ||||
}; | }; | ||||
static devclass_t pcib_devclass; | static devclass_t pcib_devclass; | ||||
DEFINE_CLASS_1(pcib, tegra_pcib_driver, tegra_pcib_methods, | DEFINE_CLASS_1(pcib, tegra_pcib_driver, tegra_pcib_methods, | ||||
sizeof(struct tegra_pcib_softc), ofw_pci_driver); | sizeof(struct tegra_pcib_softc), ofw_pcib_driver); | ||||
DRIVER_MODULE(tegra_pcib, simplebus, tegra_pcib_driver, pcib_devclass, | DRIVER_MODULE(tegra_pcib, simplebus, tegra_pcib_driver, pcib_devclass, | ||||
NULL, NULL); | NULL, NULL); |