aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/powerpc/platforms/cell/axon_msi.c
diff options
context:
space:
mode:
authorDaniel Axtens <dja@axtens.net>2015-04-14 14:27:56 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2015-05-22 15:50:55 +1000
commit7e3d6c5a4be45769a9d439a4b62ad85cfe9e6754 (patch)
tree34bea0ced35efed6a174fe4d07f4e0a1726d275e /arch/powerpc/platforms/cell/axon_msi.c
parentpowerpc/powernv: Move MSI-related ops to pci_controller_ops (diff)
downloadwireguard-linux-7e3d6c5a4be45769a9d439a4b62ad85cfe9e6754.tar.xz
wireguard-linux-7e3d6c5a4be45769a9d439a4b62ad85cfe9e6754.zip
powerpc/cell: Move MSI-related ops to pci_controller_ops
Move the Cell platform to use the pci_controller_ops structure rather than ppc_md for MSI related PCI controller operations. We can be confident that the functions will be added to the platform's ops struct before any PCI controller's ops struct is populated because: 1) These ops are added to the struct in a subsys initcall. We populate the ops in axon_msi_probe, which is the probe call for the axon-msi driver. However the driver is registered in axon_msi_init, which is a subsys initcall, so this will happen at the subsys level. 2) The controller recieves the struct later, in a device initcall. Cell populates the controller in cell_setup_phb, which is hooked up to ppc_md.pci_setup_phb. ppc_md.pci_setup_phb is only ever called in of_platform.c, as part of the OpenFirmware PCI driver's probe routine. That driver is registered in a device initcall, so it will occur *after* the struct is properly populated. Signed-off-by: Daniel Axtens <dja@axtens.net> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to '')
-rw-r--r--arch/powerpc/platforms/cell/axon_msi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/axon_msi.c b/arch/powerpc/platforms/cell/axon_msi.c
index 623bd961465a..d9b8a443458f 100644
--- a/arch/powerpc/platforms/cell/axon_msi.c
+++ b/arch/powerpc/platforms/cell/axon_msi.c
@@ -22,6 +22,7 @@
#include <asm/machdep.h>
#include <asm/prom.h>
+#include "cell.h"
/*
* MSIC registers, specified as offsets from dcr_base
@@ -406,8 +407,8 @@ static int axon_msi_probe(struct platform_device *device)
dev_set_drvdata(&device->dev, msic);
- ppc_md.setup_msi_irqs = axon_msi_setup_msi_irqs;
- ppc_md.teardown_msi_irqs = axon_msi_teardown_msi_irqs;
+ cell_pci_controller_ops.setup_msi_irqs = axon_msi_setup_msi_irqs;
+ cell_pci_controller_ops.teardown_msi_irqs = axon_msi_teardown_msi_irqs;
axon_msi_debug_setup(dn, msic);