mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] PCI: dra7xx: Invoke phy_set_mode API to set PHY mode to PHY_MODE_PCIE
@ 2019-01-24 10:45 Kishon Vijay Abraham I
  2019-01-31 17:29 ` Lorenzo Pieralisi
  0 siblings, 1 reply; 2+ messages in thread
From: Kishon Vijay Abraham I @ 2019-01-24 10:45 UTC (permalink / raw)
  To: Kishon Vijay Abraham I, Lorenzo Pieralisi
  Cc: Bjorn Helgaas, linux-omap, linux-pci, linux-kernel

Certain PHYs used with PCIe controller can also be used with other
controllers such as USB or SATA. In order to configure the PHY
to work with PCIe controller, invoke phy_set_mode API with mode
set to PHY_MODE_PCIE.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/pci/controller/dwc/pci-dra7xx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c
index efb26096ccb5..b287dbf6914c 100644
--- a/drivers/pci/controller/dwc/pci-dra7xx.c
+++ b/drivers/pci/controller/dwc/pci-dra7xx.c
@@ -517,6 +517,10 @@ static int dra7xx_pcie_enable_phy(struct dra7xx_pcie *dra7xx)
 	int i;
 
 	for (i = 0; i < phy_count; i++) {
+		ret = phy_set_mode(dra7xx->phy[i], PHY_MODE_PCIE);
+		if (ret < 0)
+			goto err_phy;
+
 		ret = phy_init(dra7xx->phy[i]);
 		if (ret < 0)
 			goto err_phy;
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI: dra7xx: Invoke phy_set_mode API to set PHY mode to PHY_MODE_PCIE
  2019-01-24 10:45 [PATCH] PCI: dra7xx: Invoke phy_set_mode API to set PHY mode to PHY_MODE_PCIE Kishon Vijay Abraham I
@ 2019-01-31 17:29 ` Lorenzo Pieralisi
  0 siblings, 0 replies; 2+ messages in thread
From: Lorenzo Pieralisi @ 2019-01-31 17:29 UTC (permalink / raw)
  To: Kishon Vijay Abraham I; +Cc: Bjorn Helgaas, linux-omap, linux-pci, linux-kernel

On Thu, Jan 24, 2019 at 04:15:37PM +0530, Kishon Vijay Abraham I wrote:
> Certain PHYs used with PCIe controller can also be used with other
> controllers such as USB or SATA. In order to configure the PHY
> to work with PCIe controller, invoke phy_set_mode API with mode
> set to PHY_MODE_PCIE.
> 
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  drivers/pci/controller/dwc/pci-dra7xx.c | 4 ++++
>  1 file changed, 4 insertions(+)

Applied to pci/dwc for v5.1, thanks.

Lorenzo

> diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c
> index efb26096ccb5..b287dbf6914c 100644
> --- a/drivers/pci/controller/dwc/pci-dra7xx.c
> +++ b/drivers/pci/controller/dwc/pci-dra7xx.c
> @@ -517,6 +517,10 @@ static int dra7xx_pcie_enable_phy(struct dra7xx_pcie *dra7xx)
>  	int i;
>  
>  	for (i = 0; i < phy_count; i++) {
> +		ret = phy_set_mode(dra7xx->phy[i], PHY_MODE_PCIE);
> +		if (ret < 0)
> +			goto err_phy;
> +
>  		ret = phy_init(dra7xx->phy[i]);
>  		if (ret < 0)
>  			goto err_phy;
> -- 
> 2.17.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-31 17:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-24 10:45 [PATCH] PCI: dra7xx: Invoke phy_set_mode API to set PHY mode to PHY_MODE_PCIE Kishon Vijay Abraham I
2019-01-31 17:29 ` Lorenzo Pieralisi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®