summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Axtens <dja@axtens.net>2015-04-14 14:28:03 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2015-06-02 11:47:45 +1000
commit1f88d5860e0b8244b28e21b63a521915e5c15313 (patch)
tree53990950a012f4c796e830ccd85ff9c0adaec0fa
parent14f95acda2f3238f3470beea0ddbf78081b3268d (diff)
powerpc: Remove MSI-related PCI controller ops from ppc_md
Remove unneeded ppc_md functions. Patch callsites to use pci_controller_ops functions exclusively. Signed-off-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r--arch/powerpc/include/asm/machdep.h6
-rw-r--r--arch/powerpc/kernel/msi.c15
2 files changed, 4 insertions, 17 deletions
diff --git a/arch/powerpc/include/asm/machdep.h b/arch/powerpc/include/asm/machdep.h
index ef8899432ae7..0d387d0570cd 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -131,12 +131,6 @@ struct machdep_calls {
/* To setup PHBs when using automatic OF platform driver for PCI */
int (*pci_setup_phb)(struct pci_controller *host);
-#ifdef CONFIG_PCI_MSI
- int (*setup_msi_irqs)(struct pci_dev *dev,
- int nvec, int type);
- void (*teardown_msi_irqs)(struct pci_dev *dev);
-#endif
-
void (*restart)(char *cmd);
void (*halt)(void);
void (*panic)(char *str);
diff --git a/arch/powerpc/kernel/msi.c b/arch/powerpc/kernel/msi.c
index 3d452f71fa25..dab616a33b8d 100644
--- a/arch/powerpc/kernel/msi.c
+++ b/arch/powerpc/kernel/msi.c
@@ -17,9 +17,8 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
{
struct pci_controller *phb = pci_bus_to_host(dev->bus);
- if ((!phb->controller_ops.setup_msi_irqs ||
- !phb->controller_ops.teardown_msi_irqs) &&
- (!ppc_md.setup_msi_irqs || !ppc_md.teardown_msi_irqs)) {
+ if (!phb->controller_ops.setup_msi_irqs ||
+ !phb->controller_ops.teardown_msi_irqs) {
pr_debug("msi: Platform doesn't provide MSI callbacks.\n");
return -ENOSYS;
}
@@ -28,18 +27,12 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
if (type == PCI_CAP_ID_MSI && nvec > 1)
return 1;
- if (phb->controller_ops.setup_msi_irqs)
- return phb->controller_ops.setup_msi_irqs(dev, nvec, type);
- else
- return ppc_md.setup_msi_irqs(dev, nvec, type);
+ return phb->controller_ops.setup_msi_irqs(dev, nvec, type);
}
void arch_teardown_msi_irqs(struct pci_dev *dev)
{
struct pci_controller *phb = pci_bus_to_host(dev->bus);
- if (phb->controller_ops.teardown_msi_irqs)
- phb->controller_ops.teardown_msi_irqs(dev);
- else
- ppc_md.teardown_msi_irqs(dev);
+ phb->controller_ops.teardown_msi_irqs(dev);
}