summaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/dwc/pci-dra7xx.c
diff options
context:
space:
mode:
authorKishon Vijay Abraham I2019-01-24 11:45:37 +0100
committerLorenzo Pieralisi2019-01-31 18:21:17 +0100
commit65c839a134e6afca13822eeb6e22abea37f86e76 (patch)
tree1a365945a562c0d22cac4719eb24768b37f9b7e7 /drivers/pci/controller/dwc/pci-dra7xx.c
parentPCI: dwc: dra7xx: Enable x2 mode support for dra74x, dra76x and dra72x (diff)
downloadkernel-qcow2-linux-65c839a134e6afca13822eeb6e22abea37f86e76.tar.gz
kernel-qcow2-linux-65c839a134e6afca13822eeb6e22abea37f86e76.tar.xz
kernel-qcow2-linux-65c839a134e6afca13822eeb6e22abea37f86e76.zip
PCI: dwc: dra7xx: Invoke phy_set_mode() API to set PHY mode to PHY_MODE_PCIE
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> [lorenzo.pieralisi@arm.com: updated commit log] Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'drivers/pci/controller/dwc/pci-dra7xx.c')
-rw-r--r--drivers/pci/controller/dwc/pci-dra7xx.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c
index 5c72acb49c11..5d5844fc143e 100644
--- a/drivers/pci/controller/dwc/pci-dra7xx.c
+++ b/drivers/pci/controller/dwc/pci-dra7xx.c
@@ -504,6 +504,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;