From: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Vince Hsu <vinceh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org,
thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] soc/tegra: pmc: Fix incorrect DPD request
Date: Wed, 10 Aug 2016 11:34:51 +0100 [thread overview]
Message-ID: <8126479a-e954-c258-ebfb-32bc2d111c5f@nvidia.com> (raw)
In-Reply-To: <1470806608-23231-1-git-send-email-vinceh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Hi Vince,
On 10/08/16 06:23, Vince Hsu wrote:
> 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.
It was not 100% clear to me at first, but now I do see what you mean.
The IO_DPD_REQ_CODE_OFF/ON indicates whether the rails are being turned
off or on and then this action is applied for all rails whose bit is set.
I have also taken a look at the Tegra TRMs for Tegra30, Tegra124 and
Tegra210 and this behaviour appears consistent across all devices.
> 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;
Nit ... can we simply this further to be just ...
value = IO_DPD_REQ_CODE_OFF | BIT(bit);
> 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;
Same here?
> tegra_pmc_writel(value, request);
>
Otherwise ...
Reviewed-by: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cheers
Jon
--
nvpublic
prev parent reply other threads:[~2016-08-10 10:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8126479a-e954-c258-ebfb-32bc2d111c5f@nvidia.com \
--to=jonathanh-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=vinceh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.