|
|
@@ -831,7 +831,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-@@ -1207,6 +1534,7 @@ static void brcm_pcie_enter_l23(struct b
|
|
|
+@@ -1208,6 +1535,7 @@ static void brcm_pcie_enter_l23(struct b
|
|
|
|
|
|
static int brcm_phy_cntl(struct brcm_pcie *pcie, const int start)
|
|
|
{
|
|
|
@@ -839,7 +839,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
static const u32 shifts[PCIE_DVT_PMU_PCIE_PHY_CTRL_DAST_NFLDS] = {
|
|
|
PCIE_DVT_PMU_PCIE_PHY_CTRL_DAST_PWRDN_SHIFT,
|
|
|
PCIE_DVT_PMU_PCIE_PHY_CTRL_DAST_RESET_SHIFT,
|
|
|
-@@ -1239,6 +1567,9 @@ static int brcm_phy_cntl(struct brcm_pci
|
|
|
+@@ -1240,6 +1568,9 @@ static int brcm_phy_cntl(struct brcm_pci
|
|
|
dev_err(pcie->dev, "failed to %s phy\n", (start ? "start" : "stop"));
|
|
|
|
|
|
return ret;
|
|
|
@@ -849,7 +849,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
}
|
|
|
|
|
|
static inline int brcm_phy_start(struct brcm_pcie *pcie)
|
|
|
-@@ -1271,6 +1602,12 @@ static void brcm_pcie_turn_off(struct br
|
|
|
+@@ -1272,6 +1603,12 @@ static void brcm_pcie_turn_off(struct br
|
|
|
u32p_replace_bits(&tmp, 1, PCIE_MISC_HARD_PCIE_HARD_DEBUG_SERDES_IDDQ_MASK);
|
|
|
writel(tmp, base + PCIE_MISC_HARD_PCIE_HARD_DEBUG);
|
|
|
|
|
|
@@ -862,7 +862,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
/* Shutdown PCIe bridge */
|
|
|
pcie->bridge_sw_init_set(pcie, 1);
|
|
|
}
|
|
|
-@@ -1301,9 +1638,9 @@ static int brcm_pcie_suspend_noirq(struc
|
|
|
+@@ -1302,9 +1639,9 @@ static int brcm_pcie_suspend_noirq(struc
|
|
|
if (brcm_phy_stop(pcie))
|
|
|
dev_err(dev, "Could not stop phy for suspend\n");
|
|
|
|
|
|
@@ -874,7 +874,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
-@@ -1398,7 +1735,7 @@ err_regulator:
|
|
|
+@@ -1399,7 +1736,7 @@ err_regulator:
|
|
|
if (pcie->sr)
|
|
|
regulator_bulk_disable(pcie->sr->num_supplies, pcie->sr->supplies);
|
|
|
err_reset:
|
|
|
@@ -883,7 +883,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
err_disable_clk:
|
|
|
clk_disable_unprepare(pcie->clk);
|
|
|
return ret;
|
|
|
-@@ -1410,8 +1747,8 @@ static void __brcm_pcie_remove(struct br
|
|
|
+@@ -1411,8 +1748,8 @@ static void __brcm_pcie_remove(struct br
|
|
|
brcm_pcie_turn_off(pcie);
|
|
|
if (brcm_phy_stop(pcie))
|
|
|
dev_err(pcie->dev, "Could not stop phy\n");
|
|
|
@@ -894,7 +894,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
clk_disable_unprepare(pcie->clk);
|
|
|
}
|
|
|
|
|
|
-@@ -1429,12 +1766,16 @@ static const int pcie_offsets[] = {
|
|
|
+@@ -1430,12 +1767,16 @@ static const int pcie_offsets[] = {
|
|
|
[RGR1_SW_INIT_1] = 0x9210,
|
|
|
[EXT_CFG_INDEX] = 0x9000,
|
|
|
[EXT_CFG_DATA] = 0x9004,
|
|
|
@@ -911,7 +911,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
};
|
|
|
|
|
|
static const struct pcie_cfg_data generic_cfg = {
|
|
|
-@@ -1442,6 +1783,7 @@ static const struct pcie_cfg_data generi
|
|
|
+@@ -1443,6 +1784,7 @@ static const struct pcie_cfg_data generi
|
|
|
.type = GENERIC,
|
|
|
.perst_set = brcm_pcie_perst_set_generic,
|
|
|
.bridge_sw_init_set = brcm_pcie_bridge_sw_init_set_generic,
|
|
|
@@ -919,7 +919,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
};
|
|
|
|
|
|
static const struct pcie_cfg_data bcm7425_cfg = {
|
|
|
-@@ -1449,6 +1791,7 @@ static const struct pcie_cfg_data bcm742
|
|
|
+@@ -1450,6 +1792,7 @@ static const struct pcie_cfg_data bcm742
|
|
|
.type = BCM7425,
|
|
|
.perst_set = brcm_pcie_perst_set_generic,
|
|
|
.bridge_sw_init_set = brcm_pcie_bridge_sw_init_set_generic,
|
|
|
@@ -927,7 +927,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
};
|
|
|
|
|
|
static const struct pcie_cfg_data bcm7435_cfg = {
|
|
|
-@@ -1463,12 +1806,15 @@ static const struct pcie_cfg_data bcm490
|
|
|
+@@ -1464,12 +1807,15 @@ static const struct pcie_cfg_data bcm490
|
|
|
.type = BCM4908,
|
|
|
.perst_set = brcm_pcie_perst_set_4908,
|
|
|
.bridge_sw_init_set = brcm_pcie_bridge_sw_init_set_generic,
|
|
|
@@ -943,7 +943,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
};
|
|
|
|
|
|
static const struct pcie_cfg_data bcm7278_cfg = {
|
|
|
-@@ -1476,6 +1822,7 @@ static const struct pcie_cfg_data bcm727
|
|
|
+@@ -1477,6 +1823,7 @@ static const struct pcie_cfg_data bcm727
|
|
|
.type = BCM7278,
|
|
|
.perst_set = brcm_pcie_perst_set_7278,
|
|
|
.bridge_sw_init_set = brcm_pcie_bridge_sw_init_set_7278,
|
|
|
@@ -951,7 +951,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
};
|
|
|
|
|
|
static const struct pcie_cfg_data bcm2711_cfg = {
|
|
|
-@@ -1483,10 +1830,27 @@ static const struct pcie_cfg_data bcm271
|
|
|
+@@ -1484,10 +1831,27 @@ static const struct pcie_cfg_data bcm271
|
|
|
.type = BCM2711,
|
|
|
.perst_set = brcm_pcie_perst_set_generic,
|
|
|
.bridge_sw_init_set = brcm_pcie_bridge_sw_init_set_generic,
|
|
|
@@ -979,7 +979,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
{ .compatible = "brcm,bcm4908-pcie", .data = &bcm4908_cfg },
|
|
|
{ .compatible = "brcm,bcm7211-pcie", .data = &generic_cfg },
|
|
|
{ .compatible = "brcm,bcm7278-pcie", .data = &bcm7278_cfg },
|
|
|
-@@ -1527,7 +1891,7 @@ static int brcm_pcie_probe(struct platfo
|
|
|
+@@ -1528,7 +1892,7 @@ static int brcm_pcie_probe(struct platfo
|
|
|
|
|
|
data = of_device_get_match_data(&pdev->dev);
|
|
|
if (!data) {
|
|
|
@@ -988,7 +988,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
return -EINVAL;
|
|
|
}
|
|
|
|
|
|
-@@ -1538,6 +1902,7 @@ static int brcm_pcie_probe(struct platfo
|
|
|
+@@ -1539,6 +1903,7 @@ static int brcm_pcie_probe(struct platfo
|
|
|
pcie->type = data->type;
|
|
|
pcie->perst_set = data->perst_set;
|
|
|
pcie->bridge_sw_init_set = data->bridge_sw_init_set;
|
|
|
@@ -996,7 +996,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
|
|
|
pcie->base = devm_platform_ioremap_resource(pdev, 0);
|
|
|
if (IS_ERR(pcie->base))
|
|
|
-@@ -1568,14 +1933,20 @@ static int brcm_pcie_probe(struct platfo
|
|
|
+@@ -1569,14 +1934,20 @@ static int brcm_pcie_probe(struct platfo
|
|
|
clk_disable_unprepare(pcie->clk);
|
|
|
return PTR_ERR(pcie->perst_reset);
|
|
|
}
|
|
|
@@ -1019,7 +1019,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
clk_disable_unprepare(pcie->clk);
|
|
|
return ret;
|
|
|
}
|
|
|
-@@ -1598,6 +1969,33 @@ static int brcm_pcie_probe(struct platfo
|
|
|
+@@ -1599,6 +1970,33 @@ static int brcm_pcie_probe(struct platfo
|
|
|
dev_err(pcie->dev, "probe of internal MSI failed");
|
|
|
goto fail;
|
|
|
}
|
|
|
@@ -1053,7 +1053,7 @@ Signed-off-by: Jonathan Bell <[email protected]>
|
|
|
}
|
|
|
|
|
|
bridge->ops = pcie->type == BCM7425 ? &brcm7425_pcie_ops : &brcm_pcie_ops;
|
|
|
-@@ -1614,6 +2012,8 @@ static int brcm_pcie_probe(struct platfo
|
|
|
+@@ -1615,6 +2013,8 @@ static int brcm_pcie_probe(struct platfo
|
|
|
return ret;
|
|
|
}
|
|
|
|