Skip to content

Commit db04efd

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 76faa01 commit db04efd

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

drivers/pci/controller/pcie-brcmstb.c

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

1647-
/* Start out assuming safe mode (both mode bits cleared) */
1648-
clkreq_cntl = readl(pcie->base + HARD_DEBUG(pcie));
1649-
clkreq_cntl &= ~PCIE_CLKREQ_MASK;
1650-
16511647
if (strcmp(mode, "no-l1ss") == 0) {
16521648
/*
16531649
* "no-l1ss" -- Provides Clock Power Management, L0s, and
@@ -1844,6 +1840,11 @@ static int brcm_pcie_start_link(struct brcm_pcie *pcie)
18441840

18451841
brcm_pcie_stats_trigger(pcie, 0);
18461842

1843+
/* Disable CLKREQ# input prior to link-up */
1844+
tmp = readl(pcie->base + HARD_DEBUG(pcie));
1845+
tmp &= ~PCIE_CLKREQ_MASK;
1846+
writel(tmp, pcie->base + HARD_DEBUG(pcie));
1847+
18471848
/* Unassert the fundamental reset */
18481849
if (pcie->tperst_clk_ms) {
18491850
/*

0 commit comments

Comments
 (0)