Skip to content

Commit 1bbe2db

Browse files
P33Mpelwell
authored andcommitted
pcie-brcmstb: move the unilateral disable of CLKREQ# before link-up
If a platform has a pull-up on CLKREQ# with no endpoint control, then this could cause link failure in the idle time between PERST# deassert and brcm_config_clkreq(). Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
1 parent 5341e6a commit 1bbe2db

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/pci/controller/pcie-brcmstb.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,10 +1566,6 @@ static void brcm_config_clkreq(struct brcm_pcie *pcie)
15661566
mode = "safe";
15671567
}
15681568

1569-
/* Start out assuming safe mode (both mode bits cleared) */
1570-
clkreq_cntl = readl(pcie->base + HARD_DEBUG(pcie));
1571-
clkreq_cntl &= ~PCIE_CLKREQ_MASK;
1572-
15731569
if (strcmp(mode, "no-l1ss") == 0) {
15741570
/*
15751571
* "no-l1ss" -- Provides Clock Power Management, L0s, and
@@ -1766,6 +1762,11 @@ static int brcm_pcie_start_link(struct brcm_pcie *pcie)
17661762

17671763
brcm_pcie_stats_trigger(pcie, 0);
17681764

1765+
/* Disable CLKREQ# input prior to link-up */
1766+
tmp = readl(pcie->base + HARD_DEBUG(pcie));
1767+
tmp &= ~PCIE_CLKREQ_MASK;
1768+
writel(tmp, pcie->base + HARD_DEBUG(pcie));
1769+
17691770
/* Unassert the fundamental reset */
17701771
if (pcie->tperst_clk_ms) {
17711772
/*

0 commit comments

Comments
 (0)