]> xenbits.xensource.com Git - people/julieng/linux-arm.git/commitdiff
Revert "acpi, thuderx, pci: Add MCFG fixup."
authorRobert Richter <rrichter@cavium.com>
Mon, 20 Jul 2015 09:19:04 +0000 (11:19 +0200)
committerJulien Grall <julien.grall@citrix.com>
Mon, 28 Sep 2015 11:05:08 +0000 (12:05 +0100)
This reverts commit 22b25883dd8632f5f84bc627eeb9ca81ee8f6377.

Signed-off-by: Vadim Lomovtsev <Vadim.Lomovtsev@caviumnetworks.com>
drivers/pci/host/pcie-thunder.c

index cbe4b44e81066da95e4b66d33868e8d7398907e2..7428401be46701a526b51689872792585f61b006 100644 (file)
@@ -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");