PCI: designware-ep: Do not disable BARs during initialization
authorKishon Vijay Abraham I <kishon@ti.com>
Fri, 18 Aug 2017 14:58:04 +0000 (20:28 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 29 Aug 2017 21:00:39 +0000 (16:00 -0500)
Some platforms like K2G has reserved use of BAR_0 which shouldn't be
disabled by software. Avoid disabling all BARs during initialization.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/dwc/pcie-designware-ep.c

index e70ebe3b9b6f38b1e0a3f6a7f1c04bcd02832936..b3205df38d52f0eca1554e2e3cd4cc2ac310ddc8 100644 (file)
@@ -283,7 +283,6 @@ int dw_pcie_ep_init(struct dw_pcie_ep *ep)
 {
        int ret;
        void *addr;
-       enum pci_barno bar;
        struct pci_epc *epc;
        struct dw_pcie *pci = to_dw_pcie_from_ep(ep);
        struct device *dev = pci->dev;
@@ -312,9 +311,6 @@ int dw_pcie_ep_init(struct dw_pcie_ep *ep)
                return -ENOMEM;
        ep->outbound_addr = addr;
 
-       for (bar = BAR_0; bar <= BAR_5; bar++)
-               dw_pcie_ep_reset_bar(pci, bar);
-
        if (ep->ops->ep_init)
                ep->ops->ep_init(ep);