]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
powerpc/cell: Move MSI-related ops to pci_controller_ops
authorDaniel Axtens <dja@axtens.net>
Tue, 14 Apr 2015 04:27:56 +0000 (14:27 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 22 May 2015 05:50:55 +0000 (15:50 +1000)
commit7e3d6c5a4be45769a9d439a4b62ad85cfe9e6754
tree34bea0ced35efed6a174fe4d07f4e0a1726d275e
parentd6381119a415316c5602710cf7fbf388d15d6d3c
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>
arch/powerpc/platforms/cell/axon_msi.c