aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy
diff options
context:
space:
mode:
authorRoger Quadros <rogerq@ti.com>2020-01-06 15:06:20 +0200
committerKishon Vijay Abraham I <kishon@ti.com>2020-01-14 10:50:19 +0530
commit7904e15b4d31a5515a882c3a87dfc898c4749fed (patch)
tree39e01a9d22b27f1fa549fea92b88dbf0c43ca304 /drivers/phy
parentphy: cadence: Sierra: remove redundant initialization of pointer regmap (diff)
downloadlinux-dev-7904e15b4d31a5515a882c3a87dfc898c4749fed.tar.xz
linux-dev-7904e15b4d31a5515a882c3a87dfc898c4749fed.zip
phy: cadence: Sierra: add phy_reset hook
Some platforms e.g. J721e need lane swap register to be programmed before reset is deasserted. This patch ensures that we propagate the phy_reset back to the reset controller driver. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com> Reviewed-by: Jyri Sarha <jsarha@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Diffstat (limited to 'drivers/phy')
-rw-r--r--drivers/phy/cadence/phy-cadence-sierra.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c
index ecfb1f9de2e3..a5c08e5bd2bf 100644
--- a/drivers/phy/cadence/phy-cadence-sierra.c
+++ b/drivers/phy/cadence/phy-cadence-sierra.c
@@ -341,10 +341,20 @@ static int cdns_sierra_phy_off(struct phy *gphy)
return reset_control_assert(ins->lnk_rst);
}
+static int cdns_sierra_phy_reset(struct phy *gphy)
+{
+ struct cdns_sierra_phy *sp = dev_get_drvdata(gphy->dev.parent);
+
+ reset_control_assert(sp->phy_rst);
+ reset_control_deassert(sp->phy_rst);
+ return 0;
+};
+
static const struct phy_ops ops = {
.init = cdns_sierra_phy_init,
.power_on = cdns_sierra_phy_on,
.power_off = cdns_sierra_phy_off,
+ .reset = cdns_sierra_phy_reset,
.owner = THIS_MODULE,
};