Signed-off-by: Daniel Axtens <d...@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(-)

diff --git a/arch/powerpc/include/asm/machdep.h 
b/arch/powerpc/include/asm/machdep.h
index f1476b8..f178cf1 100644
--- a/arch/powerpc/include/asm/machdep.h
+++ b/arch/powerpc/include/asm/machdep.h
@@ -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.
         */
diff --git a/arch/powerpc/include/asm/pci-bridge.h 
b/arch/powerpc/include/asm/pci-bridge.h
index b62e043..b08db93 100644
--- a/arch/powerpc/include/asm/pci-bridge.h
+++ b/arch/powerpc/include/asm/pci-bridge.h
@@ -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 */
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 9edb479..a535d31 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -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)
-- 
2.1.4

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to