diff options
author | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-06-21 10:58:17 +0100 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2022-06-21 10:58:17 +0100 |
commit | 81ef1a85eee6a9ab9a140db4feeee3a1775d50d9 (patch) | |
tree | da094122412ff516a72b6ec03909bded29f6a46e /drivers/pci/controller/mobiveil/pcie-mobiveil-host.c | |
parent | 793c5fb61059ce1132fdfa7b25ac58813e5f403b (diff) | |
parent | 017a20b3b1b344b949473fc09edbe626aa325dd4 (diff) |
Merge branches 'net-queue' and 'pci-mobiveil' into cex7
Diffstat (limited to 'drivers/pci/controller/mobiveil/pcie-mobiveil-host.c')
-rw-r--r-- | drivers/pci/controller/mobiveil/pcie-mobiveil-host.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c index 31a7bdebe540..defdb9a460f6 100644 --- a/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c +++ b/drivers/pci/controller/mobiveil/pcie-mobiveil-host.c @@ -76,9 +76,21 @@ static void __iomem *mobiveil_pcie_map_bus(struct pci_bus *bus, return rp->config_axi_slave_base + where; } +static int mobiveil_pcie_config_read(struct pci_bus *bus, unsigned int devfn, + int where, int size, u32 *val) +{ + struct mobiveil_pcie *pcie = bus->sysdata; + struct mobiveil_root_port *rp = &pcie->rp; + + if (bus->number > to_pci_host_bridge(bus->bridge)->busnr && + rp->ops->read_other_conf) + return rp->ops->read_other_conf(bus, devfn, where, size, val); + + return pci_generic_config_read(bus, devfn, where, size, val); +} static struct pci_ops mobiveil_pcie_ops = { .map_bus = mobiveil_pcie_map_bus, - .read = pci_generic_config_read, + .read = mobiveil_pcie_config_read, .write = pci_generic_config_write, }; @@ -298,6 +310,10 @@ int mobiveil_host_init(struct mobiveil_pcie *pcie, bool reinit) value |= PCI_CLASS_BRIDGE_PCI_NORMAL << 8; mobiveil_csr_writel(pcie, value, PAB_INTP_AXI_PIO_CLASS); + /* Platform specific host init */ + if (pcie->ops->host_init) + return pcie->ops->host_init(pcie); + return 0; } |