Skip to content

Commit

Permalink
revert pcie-patch (was only for using 3rd pcie-lane instead of usb)
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-w committed Aug 17, 2018
1 parent b1bc505 commit 2e70754
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions drivers/pci/host/pcie-mediatek.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,23 +333,10 @@ static struct mtk_pcie_port *mtk_pcie_find_port(struct pci_bus *bus,
{
struct mtk_pcie *pcie = bus->sysdata;
struct mtk_pcie_port *port;
struct pci_dev *dev;
struct pci_bus *pbus;

list_for_each_entry(port, &pcie->ports, list) {
if (bus->number == 0 && port->slot == PCI_SLOT(devfn)) {
list_for_each_entry(port, &pcie->ports, list)
if (port->slot == PCI_SLOT(devfn))
return port;
} else if (bus->number != 0) {
pbus = bus;
do {
dev = pbus->self;
if (port->slot == PCI_SLOT(dev->devfn))
return port;

pbus = dev->bus;
} while (dev->bus->number != 0);
}
}

return NULL;
}
Expand Down Expand Up @@ -676,9 +663,6 @@ static void __iomem *mtk_pcie_map_bus(struct pci_bus *bus,
{
struct mtk_pcie *pcie = bus->sysdata;

if (!mtk_pcie_find_port(bus, devfn))
return 0;

writel(PCIE_CONF_ADDR(where, PCI_FUNC(devfn), PCI_SLOT(devfn),
bus->number), pcie->base + PCIE_CFG_ADDR);

Expand Down

0 comments on commit 2e70754

Please sign in to comment.