Commit b7eba2ff authored by Daniel Axtens's avatar Daniel Axtens Committed by Michael Ellerman

powerpc/ppc4xx_msi: Move MSI-related ops to pci_controller_ops

Move the ppc4xx msi subsystem to use the pci_controller_ops structure
rather than ppc_md for MSI related PCI controller operations.

As with fsl_msi, operations are plugged in at the subsys level, after
controller creation. Again, we iterate over all controllers and
populate them with the MSI ops.
Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 00e25397
...@@ -218,6 +218,7 @@ static int ppc4xx_msi_probe(struct platform_device *dev) ...@@ -218,6 +218,7 @@ static int ppc4xx_msi_probe(struct platform_device *dev)
struct ppc4xx_msi *msi; struct ppc4xx_msi *msi;
struct resource res; struct resource res;
int err = 0; int err = 0;
struct pci_controller *phb;
dev_dbg(&dev->dev, "PCIE-MSI: Setting up MSI support...\n"); dev_dbg(&dev->dev, "PCIE-MSI: Setting up MSI support...\n");
...@@ -250,8 +251,10 @@ static int ppc4xx_msi_probe(struct platform_device *dev) ...@@ -250,8 +251,10 @@ static int ppc4xx_msi_probe(struct platform_device *dev)
} }
ppc4xx_msi = *msi; ppc4xx_msi = *msi;
ppc_md.setup_msi_irqs = ppc4xx_setup_msi_irqs; list_for_each_entry(phb, &hose_list, list_node) {
ppc_md.teardown_msi_irqs = ppc4xx_teardown_msi_irqs; phb->controller_ops.setup_msi_irqs = ppc4xx_setup_msi_irqs;
phb->controller_ops.teardown_msi_irqs = ppc4xx_teardown_msi_irqs;
}
return err; return err;
error_out: error_out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment