Commit Graph

6 Commits

Author SHA1 Message Date
Wojciech Macek
243000b19f pci_dw: Trim ATU windows bigger than 4GB
The size of the ATU MEM/IO windows is implicitly casted to uint32_t.
Because of that some window sizes were silently demoted to 0 and ignored.
Check the size if its too large, trim it to 4GB and print a warning message.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: mw
Obtained from: Semihalf
Sponsored by: Marvell
Differential revision: https://reviews.freebsd.org/D29625
2021-04-09 09:37:59 +02:00
Marcin Wojtas
57dbb3c259 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
2021-04-06 14:31:39 +02:00
Michal Meloun
cc2eaa04bb DesignWare PCIe driver: Don't call bus_generic_attach() twice.
bus_generic_attach() should be called from the attach function of the real
implementation, not from the common init function.

MFC after:	1 week
2020-12-05 10:55:09 +00:00
Mateusz Guzik
04e8183fd1 pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
Michal Meloun
1f446a117e Improve DesignWare PCIe driver:
- only normal memory window is mandatory, prefetchable memory and
  I/O windows should be optional
- full PCIe configuration space is supported
- remove duplicated check from function for accessing configuration space.
  It is already contained in pci_dw_check_dev()

MFC after:	2 weeks
2020-06-19 16:15:06 +00:00
Michal Meloun
26abae3f17 Add driver for DesignWare PCIE core, and its Armada 8K specific attachement.
MFC after:	3 weeks
2019-10-20 11:11:32 +00:00