PCI: dwc: Move dw_pcie_setup_rc() to DWC common code
[linux-2.6-microblaze.git] / drivers / pci / controller / dwc / pci-layerscape.c
index f24f79a..400ebbe 100644 (file)
@@ -83,14 +83,6 @@ static void ls_pcie_drop_msg_tlp(struct ls_pcie *pcie)
        iowrite32(val, pci->dbi_base + PCIE_STRFMR1);
 }
 
-static void ls_pcie_disable_outbound_atus(struct ls_pcie *pcie)
-{
-       int i;
-
-       for (i = 0; i < PCIE_IATU_NUM; i++)
-               dw_pcie_disable_atu(pcie->pci, i, DW_PCIE_REGION_OUTBOUND);
-}
-
 static int ls1021_pcie_link_up(struct dw_pcie *pci)
 {
        u32 state;
@@ -136,12 +128,6 @@ static int ls_pcie_host_init(struct pcie_port *pp)
        struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
        struct ls_pcie *pcie = to_ls_pcie(pci);
 
-       /*
-        * Disable outbound windows configured by the bootloader to avoid
-        * one transaction hitting multiple outbound windows.
-        * dw_pcie_setup_rc() will reconfigure the outbound windows.
-        */
-       ls_pcie_disable_outbound_atus(pcie);
        ls_pcie_fix_error_response(pcie);
 
        dw_pcie_dbi_ro_wr_en(pci);
@@ -150,8 +136,6 @@ static int ls_pcie_host_init(struct pcie_port *pp)
 
        ls_pcie_drop_msg_tlp(pcie);
 
-       dw_pcie_setup_rc(pp);
-
        return 0;
 }
 
@@ -182,37 +166,12 @@ static int ls1021_pcie_host_init(struct pcie_port *pp)
        return ls_pcie_host_init(pp);
 }
 
-static int ls_pcie_msi_host_init(struct pcie_port *pp)
-{
-       struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
-       struct device *dev = pci->dev;
-       struct device_node *np = dev->of_node;
-       struct device_node *msi_node;
-
-       /*
-        * The MSI domain is set by the generic of_msi_configure().  This
-        * .msi_host_init() function keeps us from doing the default MSI
-        * domain setup in dw_pcie_host_init() and also enforces the
-        * requirement that "msi-parent" exists.
-        */
-       msi_node = of_parse_phandle(np, "msi-parent", 0);
-       if (!msi_node) {
-               dev_err(dev, "failed to find msi-parent\n");
-               return -EINVAL;
-       }
-
-       of_node_put(msi_node);
-       return 0;
-}
-
 static const struct dw_pcie_host_ops ls1021_pcie_host_ops = {
        .host_init = ls1021_pcie_host_init,
-       .msi_host_init = ls_pcie_msi_host_init,
 };
 
 static const struct dw_pcie_host_ops ls_pcie_host_ops = {
        .host_init = ls_pcie_host_init,
-       .msi_host_init = ls_pcie_msi_host_init,
 };
 
 static const struct dw_pcie_ops dw_ls1021_pcie_ops = {