All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc/tegra: pmc: Fix incorrect DPD request
@ 2016-08-10  5:23 Vince Hsu
       [not found] ` <1470806608-23231-1-git-send-email-vinceh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Vince Hsu @ 2016-08-10  5:23 UTC (permalink / raw)
  To: swarren-3lzwWm7+Weoh9ZMKESR00Q,
	thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
	gnurou-Re5JQEeQqe8AvxtiuMwx3w, jonathanh-DDmLM1+adcrQT0dZR+AlfA
  Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Vince Hsu

Reading the DPD_REQ & DPD2_REQ registers returns the previous requests.
If we sets the current request bit with the returned value, then other
pads will be turned on or off unexpectedly.

Signed-off-by: Vince Hsu <vinceh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
Hi,

I found this issue when debugging one HDMI issue which only happened
after LP0 on Tegra124 chromebook. I did not test this patch on any
upstream platforms due to lack of setup, but it did pass Nvidia
internal EMIT verification.

Thanks,
Vince


 drivers/soc/tegra/pmc.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/soc/tegra/pmc.c b/drivers/soc/tegra/pmc.c
index 71c834f3847e..43c01a85334c 100644
--- a/drivers/soc/tegra/pmc.c
+++ b/drivers/soc/tegra/pmc.c
@@ -979,8 +979,7 @@ int tegra_io_rail_power_on(unsigned int id)
 
 	mask = 1 << bit;
 
-	value = tegra_pmc_readl(request);
-	value |= mask;
+	value = mask;
 	value &= ~IO_DPD_REQ_CODE_MASK;
 	value |= IO_DPD_REQ_CODE_OFF;
 	tegra_pmc_writel(value, request);
@@ -1016,8 +1015,7 @@ int tegra_io_rail_power_off(unsigned int id)
 
 	mask = 1 << bit;
 
-	value = tegra_pmc_readl(request);
-	value |= mask;
+	value = mask;
 	value &= ~IO_DPD_REQ_CODE_MASK;
 	value |= IO_DPD_REQ_CODE_ON;
 	tegra_pmc_writel(value, request);
-- 
2.7.4

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

end of thread, other threads:[~2016-08-10 10:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-10  5:23 [PATCH] soc/tegra: pmc: Fix incorrect DPD request Vince Hsu
     [not found] ` <1470806608-23231-1-git-send-email-vinceh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-08-10 10:34   ` Jon Hunter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.