Skip to content

Commit 171e1f1

Browse files
jamesequinlanpopcornmix
authored andcommitted
PCI: brcmstb: Set gen limitation before link, not after
When the user elects to limit the PCIe generation via the appropriate DT 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 <james.quinlan@broadcom.com> Fixes: c045213 ("PCI: brcmstb: Add Broadcom STB PCIe host controller driver") Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
1 parent 2a8da85 commit 171e1f1

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)