[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191024114042.30237-2-rogerq@ti.com>
Date: Thu, 24 Oct 2019 14:40:40 +0300
From: Roger Quadros <rogerq@...com>
To: <kishon@...com>
CC: <aniljoy@...ence.com>, <adouglas@...ence.com>, <nsekhar@...com>,
<jsarha@...com>, <linux-kernel@...r.kernel.org>,
<devicetree@...r.kernel.org>, Roger Quadros <rogerq@...com>
Subject: [PATCH v3 1/3] 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@...com>
Signed-off-by: Sekhar Nori <nsekhar@...com>
Reviewed-by: Jyri Sarha <jsarha@...com>
---
drivers/phy/cadence/phy-cadence-sierra.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/phy/cadence/phy-cadence-sierra.c b/drivers/phy/cadence/phy-cadence-sierra.c
index 04c28cbb6d39..7fed61211716 100644
--- a/drivers/phy/cadence/phy-cadence-sierra.c
+++ b/drivers/phy/cadence/phy-cadence-sierra.c
@@ -339,10 +339,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,
};
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
Powered by blists - more mailing lists