Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/pci/pci_dw.c
Show First 20 Lines • Show All 225 Lines • ▼ Show 20 Lines | pci_dw_setup_hw(struct pci_dw_softc *sc) | ||||
rv = pci_dw_map_out_atu(sc, 0, IATU_CTRL1_TYPE_MEM, | rv = pci_dw_map_out_atu(sc, 0, IATU_CTRL1_TYPE_MEM, | ||||
sc->mem_range.host, sc->mem_range.pci, sc->mem_range.size); | sc->mem_range.host, sc->mem_range.pci, sc->mem_range.size); | ||||
if (rv != 0) | if (rv != 0) | ||||
return (rv); | return (rv); | ||||
/* If we have enouht viewports ..*/ | /* If we have enouht viewports ..*/ | ||||
if (sc->num_viewport >= 3 && sc->io_range.size != 0) { | if (sc->num_viewport >= 3 && sc->io_range.size != 0) { | ||||
/* Setup outbound I/O window */ | /* Setup outbound I/O window */ | ||||
rv = pci_dw_map_out_atu(sc, 0, IATU_CTRL1_TYPE_MEM, | rv = pci_dw_map_out_atu(sc, 2, IATU_CTRL1_TYPE_IO, | ||||
sc->io_range.host, sc->io_range.pci, sc->io_range.size); | sc->io_range.host, sc->io_range.pci, sc->io_range.size); | ||||
if (rv != 0) | if (rv != 0) | ||||
return (rv); | return (rv); | ||||
} | } | ||||
/* XXX Should we handle also prefetch memory? */ | /* XXX Should we handle also prefetch memory? */ | ||||
/* Adjust number of lanes */ | /* Adjust number of lanes */ | ||||
reg = DBI_RD4(sc, DW_PORT_LINK_CTRL); | reg = DBI_RD4(sc, DW_PORT_LINK_CTRL); | ||||
▲ Show 20 Lines • Show All 435 Lines • Show Last 20 Lines |