diff options
| author | Jim Quinlan <[email protected]> | 2025-02-14 17:39:29 +0000 |
|---|---|---|
| committer | Krzysztof Wilczyński <[email protected]> | 2025-03-04 15:54:15 +0000 |
| commit | 72d36589c6b7bef6b30eb99fcb7082f72faca37f (patch) | |
| tree | 8f74d4b1ef76489eb4726c4bbb1f33b688925edc /drivers/pci/controller/pcie-brcmstb.c | |
| parent | PCI: brcmstb: Add BCM2712 support (diff) | |
| download | kernel-72d36589c6b7bef6b30eb99fcb7082f72faca37f.tar.gz kernel-72d36589c6b7bef6b30eb99fcb7082f72faca37f.zip | |
PCI: brcmstb: Set generation limit before PCIe link up
When the user elects to limit the PCIe generation via the appropriate
devicetree property, apply the settings before the PCIe link up, not
after.
Fixes: c0452137034b ("PCI: brcmstb: Add Broadcom STB PCIe host controller driver")
Signed-off-by: Jim Quinlan <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[kwilczynski: commit log]
Signed-off-by: Krzysztof Wilczyński <[email protected]>
Diffstat (limited to 'drivers/pci/controller/pcie-brcmstb.c')
| -rw-r--r-- | drivers/pci/controller/pcie-brcmstb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c index d171ee61eab3..2f1b2a4fe540 100644 --- a/drivers/pci/controller/pcie-brcmstb.c +++ b/drivers/pci/controller/pcie-brcmstb.c @@ -1324,6 +1324,10 @@ static int brcm_pcie_start_link(struct brcm_pcie *pcie) bool ssc_good = false; int ret, i; + /* Limit the generation if specified */ + if (pcie->gen) + brcm_pcie_set_gen(pcie, pcie->gen); + /* Unassert the fundamental reset */ ret = pcie->cfg->perst_set(pcie, 0); if (ret) @@ -1350,9 +1354,6 @@ static int brcm_pcie_start_link(struct brcm_pcie *pcie) brcm_config_clkreq(pcie); - if (pcie->gen) - brcm_pcie_set_gen(pcie, pcie->gen); - if (pcie->ssc) { ret = brcm_pcie_set_ssc(pcie); if (ret == 0) |
