Skip to content

Commit 2e70754

Browse files
committed
revert pcie-patch (was only for using 3rd pcie-lane instead of usb)
1 parent b1bc505 commit 2e70754

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

drivers/pci/host/pcie-mediatek.c

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -333,23 +333,10 @@ static struct mtk_pcie_port *mtk_pcie_find_port(struct pci_bus *bus,
333333
{
334334
struct mtk_pcie *pcie = bus->sysdata;
335335
struct mtk_pcie_port *port;
336-
struct pci_dev *dev;
337-
struct pci_bus *pbus;
338336

339-
list_for_each_entry(port, &pcie->ports, list) {
340-
if (bus->number == 0 && port->slot == PCI_SLOT(devfn)) {
337+
list_for_each_entry(port, &pcie->ports, list)
338+
if (port->slot == PCI_SLOT(devfn))
341339
return port;
342-
} else if (bus->number != 0) {
343-
pbus = bus;
344-
do {
345-
dev = pbus->self;
346-
if (port->slot == PCI_SLOT(dev->devfn))
347-
return port;
348-
349-
pbus = dev->bus;
350-
} while (dev->bus->number != 0);
351-
}
352-
}
353340

354341
return NULL;
355342
}
@@ -676,9 +663,6 @@ static void __iomem *mtk_pcie_map_bus(struct pci_bus *bus,
676663
{
677664
struct mtk_pcie *pcie = bus->sysdata;
678665

679-
if (!mtk_pcie_find_port(bus, devfn))
680-
return 0;
681-
682666
writel(PCIE_CONF_ADDR(where, PCI_FUNC(devfn), PCI_SLOT(devfn),
683667
bus->number), pcie->base + PCIE_CFG_ADDR);
684668

0 commit comments

Comments
 (0)