[Arm-dev] [PATCH v0 20/20] Revert "acpi, thuderx, pci: Add MCFG fixup."

Vadim Lomovtsev

Vadim.Lomovtsev at caviumnetworks.com
Thu Jul 23 12:37:57 UTC 2015


This reverts commit e6316f74ce6f149abf0112e040b0b0f4de089d80.
Build issue fix.

Signed-off-by: Vadim Lomovtsev <Vadim.Lomovtsev at caviumnetworks.com>
---
 drivers/pci/host/pcie-thunder.c | 88 -----------------------------------------
 1 file changed, 88 deletions(-)

diff --git a/drivers/pci/host/pcie-thunder.c b/drivers/pci/host/pcie-thunder.c
index cbe4b44..7428401 100644
--- a/drivers/pci/host/pcie-thunder.c
+++ b/drivers/pci/host/pcie-thunder.c
@@ -329,94 +329,6 @@ static struct platform_driver thunder_pcie_driver = {
 };
 module_platform_driver(thunder_pcie_driver);
 
-#ifdef CONFIG_ACPI
-
-static int
-thunder_mmcfg_read_config(struct pci_mmcfg_region *cfg, unsigned int busnr,
-			unsigned int devfn, int reg, int len, u32 *value)
-{
-	struct thunder_pcie *pcie = cfg->data;
-	void __iomem *addr;
-
-	if (!pcie->valid) {
-		/* Not support for now */
-		pr_err("RC PEM not supported !!!\n");
-		return PCIBIOS_DEVICE_NOT_FOUND;
-	}
-
-	addr = thunder_pcie_get_cfg_addr(pcie, busnr, devfn, reg);
-
-	switch (len) {
-	case 1:
-		*value = readb(addr);
-		break;
-	case 2:
-		*value = readw(addr);
-		break;
-	case 4:
-		*value = readl(addr);
-		break;
-	default:
-		return PCIBIOS_BAD_REGISTER_NUMBER;
-	}
-
-	return PCIBIOS_SUCCESSFUL;
-}
-
-static int thunder_mmcfg_write_config(struct pci_mmcfg_region *cfg,
-		unsigned int busnr, unsigned int devfn, int reg, int len,
-		u32 value) {
-	struct thunder_pcie *pcie = cfg->data;
-	void __iomem *addr;
-
-	if (!pcie->valid) {
-		/* Not support for now */
-		pr_err("RC PEM not supported !!!\n");
-		return PCIBIOS_DEVICE_NOT_FOUND;
-	}
-
-	addr = thunder_pcie_get_cfg_addr(pcie, busnr, devfn, reg);
-
-	switch (len) {
-	case 1:
-		writeb(value, addr);
-		break;
-	case 2:
-		writew(value, addr);
-		break;
-	case 4:
-		writel(value, addr);
-		break;
-	default:
-		return PCIBIOS_BAD_REGISTER_NUMBER;
-	}
-
-	return PCIBIOS_SUCCESSFUL;
-}
-
-static int thunder_acpi_mcfg_fixup(struct acpi_pci_root *root,
-				   struct pci_mmcfg_region *cfg)
-{
-	struct thunder_pcie *pcie;
-
-	pcie = kzalloc(sizeof(*pcie), GFP_KERNEL);
-	if (!pcie)
-		return -ENOMEM;
-
-	pcie->dev = &root->device->dev;
-
-	thunder_pcie_config(pcie, cfg->address);
-
-	pcie->cfg_base = cfg->virt;
-	cfg->data = pcie;
-	cfg->read = thunder_mmcfg_read_config;
-	cfg->write = thunder_mmcfg_write_config;
-
-	return 0;
-}
-DECLARE_ACPI_MCFG_FIXUP("CAVIUM", "THUNDERX", thunder_acpi_mcfg_fixup);
-#endif
-
 MODULE_AUTHOR("Sunil Goutham");
 MODULE_DESCRIPTION("Cavium Thunder ECAM host controller driver");
 MODULE_LICENSE("GPL v2");
-- 
2.4.3




More information about the Arm-dev mailing list