PCI: dwc: Add validation that PCIe core is set to correct mode
authorJonathan Chocron <jonnyc@amazon.com>
Thu, 12 Sep 2019 13:02:38 +0000 (16:02 +0300)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Mon, 16 Sep 2019 13:17:15 +0000 (14:17 +0100)
commit0b24134f7888175c9638e6fd1900e23e44fc172f
tree085ed446d1c3e5c30d6c58d3df950a8701f4f159
parenta8daea94754989f6c48dafda840482cbc9f882f9
PCI: dwc: Add validation that PCIe core is set to correct mode

Some PCIe controllers can be set to either Host or EP according to some
early boot FW. To make sure there is no discrepancy (e.g. FW configured
the port to EP mode while the DT specifies it as a host bridge or vice
versa), a check has been added for each mode.

Signed-off-by: Jonathan Chocron <jonnyc@amazon.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Andrew Murray <andrew.murray@arm.com>
Acked-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com>
drivers/pci/controller/dwc/pcie-designware-ep.c
drivers/pci/controller/dwc/pcie-designware-host.c