/* 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);
{
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;
}
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);
}