[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<DU2PR04MB8677671D9E1C54C871B97C538C692@DU2PR04MB8677.eurprd04.prod.outlook.com>
Date: Wed, 25 Sep 2024 03:06:09 +0000
From: Hongxing Zhu <hongxing.zhu@....com>
To: Frank Li <frank.li@....com>, Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof Wilczyński <kw@...ux.com>, Manivannan
Sadhasivam <manivannan.sadhasivam@...aro.org>, Rob Herring <robh@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, Krzysztof Kozlowski
<krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Abraham I
<kishon@...nel.org>, Saravana Kannan <saravanak@...gle.com>, Jingoo Han
<jingoohan1@...il.com>, Gustavo Pimentel <gustavo.pimentel@...opsys.com>,
Jesper Nilsson <jesper.nilsson@...s.com>, Lucas Stach
<l.stach@...gutronix.de>, Shawn Guo <shawnguo@...nel.org>, Sascha Hauer
<s.hauer@...gutronix.de>, Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>
CC: "linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...s.com" <linux-arm-kernel@...s.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "imx@...ts.linux.dev"
<imx@...ts.linux.dev>, Krzysztof Wilczyński
<kwilczynski@...nel.org>
Subject: RE: [PATCH v2 3/4] PCI: imx6: Pass correct sub mode when calling
phy_set_mode_ext()
> -----Original Message-----
> From: Frank Li <frank.li@....com>
> Sent: 2024年9月24日 2:59
> To: Lorenzo Pieralisi <lpieralisi@...nel.org>; Krzysztof Wilczyński
> <kw@...ux.com>; Manivannan Sadhasivam
> <manivannan.sadhasivam@...aro.org>; Rob Herring <robh@...nel.org>;
> Bjorn Helgaas <bhelgaas@...gle.com>; Krzysztof Kozlowski
> <krzk+dt@...nel.org>; Conor Dooley <conor+dt@...nel.org>; Abraham I
> <kishon@...nel.org>; Saravana Kannan <saravanak@...gle.com>; Jingoo
> Han <jingoohan1@...il.com>; Gustavo Pimentel
> <gustavo.pimentel@...opsys.com>; Jesper Nilsson
> <jesper.nilsson@...s.com>; Hongxing Zhu <hongxing.zhu@....com>; Lucas
> Stach <l.stach@...gutronix.de>; Shawn Guo <shawnguo@...nel.org>;
> Sascha Hauer <s.hauer@...gutronix.de>; Pengutronix Kernel Team
> <kernel@...gutronix.de>; Fabio Estevam <festevam@...il.com>
> Cc: linux-pci@...r.kernel.org; devicetree@...r.kernel.org;
> linux-kernel@...r.kernel.org; linux-arm-kernel@...s.com;
> linux-arm-kernel@...ts.infradead.org; imx@...ts.linux.dev; Krzysztof
> Wilczyński <kwilczynski@...nel.org>; Frank Li <frank.li@....com>
> Subject: [PATCH v2 3/4] PCI: imx6: Pass correct sub mode when calling
> phy_set_mode_ext()
>
> Fix hardcoding to Root Complex (RC) mode by adding a drvdata mode check.
> Pass PHY_MODE_PCIE_EP if the PCI controller operates in Endpoint (EP)
> mode.
>
> Fixes: 8026f2d8e8a9 ("PCI: imx6: Call common PHY API to set mode, speed,
> and submode")
> Signed-off-by: Frank Li <Frank.Li@....com>
Reviewed-by: Richard Zhu <hongxing.zhu@....com>
Best Regards
Richard Zhu
> ---
> drivers/pci/controller/dwc/pci-imx6.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c
> b/drivers/pci/controller/dwc/pci-imx6.c
> index 808d1f1054173..bdc2b372e6c13 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -961,7 +961,9 @@ static int imx_pcie_host_init(struct dw_pcie_rp *pp)
> goto err_clk_disable;
> }
>
> - ret = phy_set_mode_ext(imx_pcie->phy, PHY_MODE_PCIE,
> PHY_MODE_PCIE_RC);
> + ret = phy_set_mode_ext(imx_pcie->phy, PHY_MODE_PCIE,
> + imx_pcie->drvdata->mode ==
> DW_PCIE_EP_TYPE ?
> + PHY_MODE_PCIE_EP : PHY_MODE_PCIE_RC);
> if (ret) {
> dev_err(dev, "unable to set PCIe PHY mode\n");
> goto err_phy_exit;
>
> --
> 2.34.1
Powered by blists - more mailing lists