Skip to content

Commit 72d3658

Browse files
jamesequinlankwilczynski
authored andcommitted
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: c045213 ("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]>
1 parent 377bced commit 72d3658

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/pci/controller/pcie-brcmstb.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1324,6 +1324,10 @@ static int brcm_pcie_start_link(struct brcm_pcie *pcie)
13241324
bool ssc_good = false;
13251325
int ret, i;
13261326

1327+
/* Limit the generation if specified */
1328+
if (pcie->gen)
1329+
brcm_pcie_set_gen(pcie, pcie->gen);
1330+
13271331
/* Unassert the fundamental reset */
13281332
ret = pcie->cfg->perst_set(pcie, 0);
13291333
if (ret)
@@ -1350,9 +1354,6 @@ static int brcm_pcie_start_link(struct brcm_pcie *pcie)
13501354

13511355
brcm_config_clkreq(pcie);
13521356

1353-
if (pcie->gen)
1354-
brcm_pcie_set_gen(pcie, pcie->gen);
1355-
13561357
if (pcie->ssc) {
13571358
ret = brcm_pcie_set_ssc(pcie);
13581359
if (ret == 0)

0 commit comments

Comments
 (0)