pci_dw: fix outbound I/O window configuration

Use viewport "2" instead of "0" and change window type from MEM to IO.
Without these changes the MEM ATU window can be overwritten with the IO one.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Obtained from: Semihalf
Sponsored by: Marvell
Differential revision: https://reviews.freebsd.org/D29516
This commit is contained in:
Marcin Wojtas 2021-04-06 14:31:39 +02:00
parent 28d14569c8
commit 57dbb3c259

View File

@ -231,7 +231,7 @@ pci_dw_setup_hw(struct pci_dw_softc *sc)
/* If we have enouht viewports ..*/
if (sc->num_viewport >= 3 && sc->io_range.size != 0) {
/* 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);
if (rv != 0)
return (rv);