Skip to content

Commit

Permalink
powerpc/pci: Remove duplicate logic
Browse files Browse the repository at this point in the history
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: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
Gavin Shan authored and Bjorn Helgaas committed Jul 3, 2014
1 parent 9e33002 commit 21dd5a4
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions arch/powerpc/kernel/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,21 +123,12 @@ resource_size_t pcibios_window_alignment(struct pci_bus *bus,

void pcibios_reset_secondary_bus(struct pci_dev *dev)
{
u16 ctrl;

if (ppc_md.pcibios_reset_secondary_bus) {
ppc_md.pcibios_reset_secondary_bus(dev);
return;
}

pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &ctrl);
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);
pci_reset_secondary_bus(dev);
}

static resource_size_t pcibios_io_size(const struct pci_controller *hose)
Expand Down

0 comments on commit 21dd5a4

Please sign in to comment.