From: Bjorn Helgaas <helgaas@kernel.org>
To: Richard Zhu <hongxing.zhu@nxp.com>
Cc: l.stach@pengutronix.de, bhelgaas@google.com,
lorenzo.pieralisi@arm.com, tharvey@gateworks.com,
linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, kernel@pengutronix.de,
linux-imx@nxp.com
Subject: Re: [PATCH v2] PCI: imx6: Support more than Gen2 speed link mode
Date: Wed, 20 Jul 2022 16:15:41 -0500 [thread overview]
Message-ID: <20220720211541.GA1658730@bhelgaas> (raw)
In-Reply-To: <1658287576-26908-1-git-send-email-hongxing.zhu@nxp.com>
On Wed, Jul 20, 2022 at 11:26:16AM +0800, Richard Zhu wrote:
> Support more than Gen2 speed link mode, since i.MX8MP PCIe supports up to
> Gen3 link speed.
>
> Link: https://lore.kernel.org/r/1652866528-13220-2-git-send-email-hongxing.zhu@nxp.com
> Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
You should not post patches with my signed-off-by.
I add my signed-off-by to patches when I merge them.
I applied this to pci/ctrl/imx6, replacing the v1 patch, thanks!
> ---
> Changes from v1:
> - The Supported Link Speeds of the PCI_EXP_LNKCAP should be re-configured too.
> - When only Gen1 is enabled, refine the dev_info accordingly.
>
> ---
> drivers/pci/controller/dwc/pci-imx6.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index e1ba11dabaa8..b66876f7efe0 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -844,12 +844,12 @@ static int imx6_pcie_start_link(struct dw_pcie *pci)
> if (ret)
> goto err_reset_phy;
>
> - if (pci->link_gen == 2) {
> - /* Allow Gen2 mode after the link is up. */
> + if (pci->link_gen > 1) {
> + /* Allow faster modes after the link is up */
> dw_pcie_dbi_ro_wr_en(pci);
> tmp = dw_pcie_readl_dbi(pci, offset + PCI_EXP_LNKCAP);
> tmp &= ~PCI_EXP_LNKCAP_SLS;
> - tmp |= PCI_EXP_LNKCAP_SLS_5_0GB;
> + tmp |= pci->link_gen;
> dw_pcie_writel_dbi(pci, offset + PCI_EXP_LNKCAP, tmp);
>
> /*
> @@ -884,7 +884,7 @@ static int imx6_pcie_start_link(struct dw_pcie *pci)
> if (ret)
> goto err_reset_phy;
> } else {
> - dev_info(dev, "Link: Gen2 disabled\n");
> + dev_info(dev, "Link: Only Gen1 is enabled\n");
> }
>
> imx6_pcie->link_is_up = true;
> --
> 2.25.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-07-20 21:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-20 3:26 [PATCH v2] PCI: imx6: Support more than Gen2 speed link mode Richard Zhu
2022-07-20 21:15 ` Bjorn Helgaas [this message]
2022-07-21 6:05 ` Hongxing Zhu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220720211541.GA1658730@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=hongxing.zhu@nxp.com \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=tharvey@gateworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).