static int pcie_rd_conf_wa(struct pci_bus *bus, u32 devfn, int where, int size, u32 *val) { int ret; if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0) { *val = 0xffffffff; return PCIBIOS_DEVICE_NOT_FOUND; } /* * We only support access to the non-extended configuration * space when using the WA access method (or we would have to * sacrifice 256M of CPU virtual address space.) */ if (where >= 0x100) { *val = 0xffffffff; return PCIBIOS_DEVICE_NOT_FOUND; } ret = orion_pcie_rd_conf_wa((void __iomem *)ORION5X_PCIE_WA_VIRT_BASE, bus, devfn, where, size, val); return ret; }
static int pcie_rd_conf_wa(struct pci_bus *bus, u32 devfn, int where, int size, u32 *val) { int ret; if (pcie_valid_config(bus->number, PCI_SLOT(devfn)) == 0) { *val = 0xffffffff; return PCIBIOS_DEVICE_NOT_FOUND; } if (where >= 0x100) { *val = 0xffffffff; return PCIBIOS_DEVICE_NOT_FOUND; } ret = orion_pcie_rd_conf_wa((void __iomem *)ORION5X_PCIE_WA_VIRT_BASE, bus, devfn, where, size, val); return ret; }