From fa82ab2419fe3fe533e38a17e1ac7edcf6e10e97 Mon Sep 17 00:00:00 2001 From: Jonathan Bell Date: Thu, 5 Feb 2026 11:22:51 +0000 Subject: [PATCH] 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 --- drivers/pci/controller/pcie-brcmstb.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index 91e17d4c0e689e..59743e0a053571 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -1566,10 +1566,6 @@ static void brcm_config_clkreq(struct brcm_pcie *pcie) mode = "safe"; } - /* Start out assuming safe mode (both mode bits cleared) */ - clkreq_cntl = readl(pcie->base + HARD_DEBUG(pcie)); - clkreq_cntl &= ~PCIE_CLKREQ_MASK; - if (strcmp(mode, "no-l1ss") == 0) { /* * "no-l1ss" -- Provides Clock Power Management, L0s, and @@ -1766,6 +1762,11 @@ static int brcm_pcie_start_link(struct brcm_pcie *pcie) brcm_pcie_stats_trigger(pcie, 0); + /* Disable CLKREQ# input prior to link-up */ + tmp = readl(pcie->base + HARD_DEBUG(pcie)); + tmp &= ~PCIE_CLKREQ_MASK; + writel(tmp, pcie->base + HARD_DEBUG(pcie)); + /* Unassert the fundamental reset */ if (pcie->tperst_clk_ms) { /*