* [PATCH] phy-rockchip-pcie: remove deassert of phy_rst from exit callback
@ 2016-10-13 4:42 Shawn Lin
2016-10-28 8:31 ` Heiko Stuebner
0 siblings, 1 reply; 3+ messages in thread
From: Shawn Lin @ 2016-10-13 4:42 UTC (permalink / raw)
To: Kishon Vijay Abraham I
Cc: Jeffy Chen, Heiko Stuebner, Shawn Lin, Brian Norris,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Wenrui Li
The deassert of phy_rst from exit callback is incorrect as when
doing phy_exit, we expect the phy_rst is on asserted state which was
done by power_off callback, but not deasserted state. Meanwhile when
disabling clk_pciephy_ref, the assert/deassert signal can't actually
take effect on the phy. So let's fix it anyway.
Signed-off-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
drivers/phy/phy-rockchip-pcie.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/phy/phy-rockchip-pcie.c b/drivers/phy/phy-rockchip-pcie.c
index a2b4c6b..6904633 100644
--- a/drivers/phy/phy-rockchip-pcie.c
+++ b/drivers/phy/phy-rockchip-pcie.c
@@ -249,21 +249,10 @@ static int rockchip_pcie_phy_init(struct phy *phy)
static int rockchip_pcie_phy_exit(struct phy *phy)
{
struct rockchip_pcie_phy *rk_phy = phy_get_drvdata(phy);
- int err = 0;
clk_disable_unprepare(rk_phy->clk_pciephy_ref);
- err = reset_control_deassert(rk_phy->phy_rst);
- if (err) {
- dev_err(&phy->dev, "deassert phy_rst err %d\n", err);
- goto err_reset;
- }
-
- return err;
-
-err_reset:
- clk_prepare_enable(rk_phy->clk_pciephy_ref);
- return err;
+ return 0;
}
static const struct phy_ops ops = {
--
2.3.7
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] phy-rockchip-pcie: remove deassert of phy_rst from exit callback
2016-10-13 4:42 [PATCH] phy-rockchip-pcie: remove deassert of phy_rst from exit callback Shawn Lin
@ 2016-10-28 8:31 ` Heiko Stuebner
2016-11-05 5:48 ` Kishon Vijay Abraham I
0 siblings, 1 reply; 3+ messages in thread
From: Heiko Stuebner @ 2016-10-28 8:31 UTC (permalink / raw)
To: Shawn Lin
Cc: Kishon Vijay Abraham I, linux-kernel, linux-rockchip, Jeffy Chen,
Wenrui Li, Brian Norris
Am Donnerstag, 13. Oktober 2016, 12:42:13 CEST schrieb Shawn Lin:
> The deassert of phy_rst from exit callback is incorrect as when
> doing phy_exit, we expect the phy_rst is on asserted state which was
> done by power_off callback, but not deasserted state. Meanwhile when
> disabling clk_pciephy_ref, the assert/deassert signal can't actually
> take effect on the phy. So let's fix it anyway.
>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
looks ok to have that removed, as any future phy_init call will make sure it
gets asserted anyway.
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] phy-rockchip-pcie: remove deassert of phy_rst from exit callback
2016-10-28 8:31 ` Heiko Stuebner
@ 2016-11-05 5:48 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 3+ messages in thread
From: Kishon Vijay Abraham I @ 2016-11-05 5:48 UTC (permalink / raw)
To: Heiko Stuebner, Shawn Lin
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Jeffy Chen,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Wenrui Li, Brian Norris
On Friday 28 October 2016 02:01 PM, Heiko Stuebner wrote:
> Am Donnerstag, 13. Oktober 2016, 12:42:13 CEST schrieb Shawn Lin:
>> The deassert of phy_rst from exit callback is incorrect as when
>> doing phy_exit, we expect the phy_rst is on asserted state which was
>> done by power_off callback, but not deasserted state. Meanwhile when
>> disabling clk_pciephy_ref, the assert/deassert signal can't actually
>> take effect on the phy. So let's fix it anyway.
>>
>> Signed-off-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>
> looks ok to have that removed, as any future phy_init call will make sure it
> gets asserted anyway.
>
> Reviewed-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
merged, thanks.
-Kishon
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-05 5:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-13 4:42 [PATCH] phy-rockchip-pcie: remove deassert of phy_rst from exit callback Shawn Lin
2016-10-28 8:31 ` Heiko Stuebner
2016-11-05 5:48 ` Kishon Vijay Abraham I
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox