@@ -244,9 +244,6 @@ struct machdep_calls {
/* Called after scan and before resource survey */
void (*pcibios_fixup_phb)(struct pci_controller *hose);
- /* Reset the secondary bus of bridge */
- void (*pcibios_reset_secondary_bus)(struct pci_dev *dev);
-
/* Called to shutdown machine specific hardware not already controlled
* by other drivers.
*/
@@ -327,21 +327,5 @@ static inline bool enable_device_hook(struct pci_dev *dev)
return true;
}
-static inline void reset_secondary_bus(struct pci_dev *dev)
-{
- struct pci_controller *hose = pci_bus_to_host(dev->bus);
-
- if (hose->controller_ops.reset_secondary_bus)
- hose->controller_ops.reset_secondary_bus(dev);
- else if (ppc_md.pcibios_reset_secondary_bus)
- ppc_md.pcibios_reset_secondary_bus(dev);
- else
- /*
- * Fallback to the generic function if no
- * platform-specific one is provided
- */
- pci_reset_secondary_bus(dev);
-}
-
#endif /* __KERNEL__ */
#endif /* _ASM_POWERPC_PCI_BRIDGE_H */
@@ -124,7 +124,14 @@ resource_size_t pcibios_window_alignment(struct pci_bus *bus,
void pcibios_reset_secondary_bus(struct pci_dev *dev)
{
- reset_secondary_bus(dev);
+ struct pci_controller *hose = pci_bus_to_host(dev->bus);
+
+ if (hose->controller_ops.reset_secondary_bus) {
+ hose->controller_ops.reset_secondary_bus(dev);
+ return;
+ }
+
+ pci_reset_secondary_bus(dev);
}
static resource_size_t pcibios_io_size(const struct pci_controller *hose)
Signed-off-by: Daniel Axtens <dja@axtens.net> --- arch/powerpc/include/asm/machdep.h | 3 --- arch/powerpc/include/asm/pci-bridge.h | 16 ---------------- arch/powerpc/kernel/pci-common.c | 9 ++++++++- 3 files changed, 8 insertions(+), 20 deletions(-)