Skip to content

Commit 6213c6c

Browse files
Richard Zhubjorn-helgaas
authored andcommitted
PCI: imx6: Support more than Gen2 speed link mode
Support more than Gen2 speed link mode, since i.MX8MP PCIe supports up to Gen3 link speed. Link: https://lore.kernel.org/r/1658287576-26908-1-git-send-email-hongxing.zhu@nxp.com Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
1 parent 13f8f3d commit 6213c6c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/pci/controller/dwc/pci-imx6.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -844,12 +844,12 @@ static int imx6_pcie_start_link(struct dw_pcie *pci)
844844
if (ret)
845845
goto err_reset_phy;
846846

847-
if (pci->link_gen == 2) {
848-
/* Allow Gen2 mode after the link is up. */
847+
if (pci->link_gen > 1) {
848+
/* Allow faster modes after the link is up */
849849
dw_pcie_dbi_ro_wr_en(pci);
850850
tmp = dw_pcie_readl_dbi(pci, offset + PCI_EXP_LNKCAP);
851851
tmp &= ~PCI_EXP_LNKCAP_SLS;
852-
tmp |= PCI_EXP_LNKCAP_SLS_5_0GB;
852+
tmp |= pci->link_gen;
853853
dw_pcie_writel_dbi(pci, offset + PCI_EXP_LNKCAP, tmp);
854854

855855
/*
@@ -884,7 +884,7 @@ static int imx6_pcie_start_link(struct dw_pcie *pci)
884884
if (ret)
885885
goto err_reset_phy;
886886
} else {
887-
dev_info(dev, "Link: Gen2 disabled\n");
887+
dev_info(dev, "Link: Only Gen1 is enabled\n");
888888
}
889889

890890
imx6_pcie->link_is_up = true;

0 commit comments

Comments
 (0)