diff options
author | Daniel Axtens <dja@axtens.net> | 2015-03-31 01:00:43 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2015-04-11 06:49:11 -0400 |
commit | b122c95494374ab848f8d9f41d98644c2c318ecc (patch) | |
tree | 071023b384a0f6aa413110c65f6f4ccb7246a203 /arch/powerpc/include | |
parent | e02def5bce12b472e9eb6dcdd9f7af72239e6330 (diff) |
powerpc: Create pci_controller_ops.dma_bus_setup and shim
Add pci_controller_ops.dma_bus_setup, shadowing ppc_md.pci_dma_bus_setup.
Add a shim, and changes the callsites to use the shim.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/include')
-rw-r--r-- | arch/powerpc/include/asm/pci-bridge.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h index 0f441b8e1ea1..b9732fcb0f5f 100644 --- a/arch/powerpc/include/asm/pci-bridge.h +++ b/arch/powerpc/include/asm/pci-bridge.h | |||
@@ -19,6 +19,7 @@ struct device_node; | |||
19 | */ | 19 | */ |
20 | struct pci_controller_ops { | 20 | struct pci_controller_ops { |
21 | void (*dma_dev_setup)(struct pci_dev *dev); | 21 | void (*dma_dev_setup)(struct pci_dev *dev); |
22 | void (*dma_bus_setup)(struct pci_bus *bus); | ||
22 | }; | 23 | }; |
23 | 24 | ||
24 | /* | 25 | /* |
@@ -281,5 +282,15 @@ static inline void pci_dma_dev_setup(struct pci_dev *dev) | |||
281 | ppc_md.pci_dma_dev_setup(dev); | 282 | ppc_md.pci_dma_dev_setup(dev); |
282 | } | 283 | } |
283 | 284 | ||
285 | static inline void pci_dma_bus_setup(struct pci_bus *bus) | ||
286 | { | ||
287 | struct pci_controller *phb = pci_bus_to_host(bus); | ||
288 | |||
289 | if (phb->controller_ops.dma_bus_setup) | ||
290 | phb->controller_ops.dma_bus_setup(bus); | ||
291 | else if (ppc_md.pci_dma_bus_setup) | ||
292 | ppc_md.pci_dma_bus_setup(bus); | ||
293 | } | ||
294 | |||
284 | #endif /* __KERNEL__ */ | 295 | #endif /* __KERNEL__ */ |
285 | #endif /* _ASM_POWERPC_PCI_BRIDGE_H */ | 296 | #endif /* _ASM_POWERPC_PCI_BRIDGE_H */ |