From: Thierry Reding <thierry.reding@gmail.com>
To: Jon Hunter <jonathanh@nvidia.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Peter De Schrijver <pdeschrijver@nvidia.com>,
Alex Frid <afrid@nvidia.com>,
linux-clk@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: Re: [PATCH 2/3] clk: tegra: Warn if an enabled PLL is in IDDQ
Date: Mon, 17 Jun 2019 13:14:07 +0200 [thread overview]
Message-ID: <20190617111407.GH508@ulmo> (raw)
In-Reply-To: <b4c8a1fe-4d68-9999-8fc9-e7db3c64525f@nvidia.com>
[-- Attachment #1: Type: text/plain, Size: 1631 bytes --]
On Mon, Jun 17, 2019 at 11:39:48AM +0100, Jon Hunter wrote:
>
> On 13/06/2019 17:12, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > A PLL in IDDQ doesn't work, whether it's enabled or not. This is not a
> > configuration that makes sense, so warn about it.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> > drivers/clk/tegra/clk-tegra210.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/clk/tegra/clk-tegra210.c b/drivers/clk/tegra/clk-tegra210.c
> > index 4904ac4a75db..793c7acaf4e2 100644
> > --- a/drivers/clk/tegra/clk-tegra210.c
> > +++ b/drivers/clk/tegra/clk-tegra210.c
> > @@ -1003,8 +1003,12 @@ static void tegra210_pllre_set_defaults(struct tegra_clk_pll *pllre)
> > _pll_misc_chk_default(clk_base, pllre->params, 0, val,
> > ~mask & PLLRE_MISC0_WRITE_MASK);
> >
> > - /* Enable lock detect */
> > + /* The PLL doesn't work if it's in IDDQ. */
> > val = readl_relaxed(clk_base + pllre->params->ext_misc_reg[0]);
> > + if (val & PLLRE_MISC0_IDDQ)
> > + pr_warn("unexpected IDDQ bit set for enabled clock\n");
> > +
> > + /* Enable lock detect */
> > val &= ~mask;
> > val |= PLLRE_MISC0_DEFAULT_VALUE & mask;
> > writel_relaxed(val, clk_base + pllre->params->ext_misc_reg[0]);
>
> Looks like there are a few other instances of this that could be fixed
> as well.
Yeah. This is the only one that's showing up in logs, so I was
concentrating on this one. I'll make another pass over the driver and
clean up the rest of them in a separate patch.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-06-17 11:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 16:12 [PATCH 1/3] clk: tegra: Do not warn unnecessarily Thierry Reding
2019-06-13 16:12 ` [PATCH 2/3] clk: tegra: Warn if an enabled PLL is in IDDQ Thierry Reding
2019-06-17 10:39 ` Jon Hunter
2019-06-17 11:14 ` Thierry Reding [this message]
2019-06-25 23:13 ` Stephen Boyd
2019-06-13 16:12 ` [PATCH 3/3] clk: tegra: Do not enable PLL_RE_VCO on Tegra210 Thierry Reding
2019-06-17 10:43 ` Jon Hunter
2019-06-25 23:13 ` Stephen Boyd
2019-06-17 10:32 ` [PATCH 1/3] clk: tegra: Do not warn unnecessarily Jon Hunter
2019-06-25 23:13 ` Stephen Boyd
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=20190617111407.GH508@ulmo \
--to=thierry.reding@gmail.com \
--cc=afrid@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=pdeschrijver@nvidia.com \
--cc=sboyd@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox