Commit 21dd5a43 authored by Gavin Shan's avatar Gavin Shan Committed by Bjorn Helgaas

powerpc/pci: Remove duplicate logic

Since the logic to reset PCI secondary bus by PCI config register
PCI_BRIDGE_CTL_BUS_RESET is included in pci_reset_secondary_bus(), we
needn't implement another one.

Remove the duplicate implementation and call pci_reset_secondary_bus().
Signed-off-by: default avatarGavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 9e33002f
...@@ -123,21 +123,12 @@ resource_size_t pcibios_window_alignment(struct pci_bus *bus, ...@@ -123,21 +123,12 @@ resource_size_t pcibios_window_alignment(struct pci_bus *bus,
void pcibios_reset_secondary_bus(struct pci_dev *dev) void pcibios_reset_secondary_bus(struct pci_dev *dev)
{ {
u16 ctrl;
if (ppc_md.pcibios_reset_secondary_bus) { if (ppc_md.pcibios_reset_secondary_bus) {
ppc_md.pcibios_reset_secondary_bus(dev); ppc_md.pcibios_reset_secondary_bus(dev);
return; return;
} }
pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &ctrl); pci_reset_secondary_bus(dev);
ctrl |= PCI_BRIDGE_CTL_BUS_RESET;
pci_write_config_word(dev, PCI_BRIDGE_CONTROL, ctrl);
msleep(2);
ctrl &= ~PCI_BRIDGE_CTL_BUS_RESET;
pci_write_config_word(dev, PCI_BRIDGE_CONTROL, ctrl);
ssleep(1);
} }
static resource_size_t pcibios_io_size(const struct pci_controller *hose) static resource_size_t pcibios_io_size(const struct pci_controller *hose)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment