From: Darren Hart <dvhart@infradead.org>
To: Enric Balletbo Serra <eballetbo@gmail.com>
Cc: Carlo Caione <carlo@caione.org>,
Michael Turquette <mturquette@baylibre.com>,
linux-clk@vger.kernel.org,
Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
Stephen Boyd <sboyd@codeaurora.org>,
linux@endlessm.com,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Carlo Caione <carlo@endlessm.com>
Subject: Re: [PATCH] clk: x86: Do not gate clocks enabled by the firmware
Date: Mon, 10 Jul 2017 16:54:03 -0700 [thread overview]
Message-ID: <20170710235403.GB25390@fury> (raw)
In-Reply-To: <CAFqH_51Mje4tK494JRgb=wWJNU9zu=WZ1sS482kRAvRrPpLkXQ@mail.gmail.com>
On Tue, Jul 11, 2017 at 12:31:28AM +0200, Enric Balletbo Serra wrote:
> Hi,
>
> 2017-07-10 22:38 GMT+02:00 Carlo Caione <carlo@caione.org>:
> > From: Carlo Caione <carlo@endlessm.com>
> >
> > Read the enable register to determine if the clock is already in use by
> > the firmware. In this case avoid gating the clock.
> >
> > Signed-off-by: Carlo Caione <carlo@endlessm.com>
> > ---
> > drivers/clk/x86/clk-pmc-atom.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/clk/x86/clk-pmc-atom.c b/drivers/clk/x86/clk-pmc-atom.c
> > index 2b60577703ef..46a8b6216fca 100644
> > --- a/drivers/clk/x86/clk-pmc-atom.c
> > +++ b/drivers/clk/x86/clk-pmc-atom.c
> > @@ -185,6 +185,9 @@ static struct clk_plt *plt_clk_register(struct platform_device *pdev, int id,
> > pclk->reg = base + PMC_CLK_CTL_OFFSET + id * PMC_CLK_CTL_SIZE;
> > spin_lock_init(&pclk->lock);
> >
> > + if (plt_clk_is_enabled(&pclk->hw))
> > + init.flags |= CLK_IGNORE_UNUSED;
> > +
> > ret = devm_clk_hw_register(&pdev->dev, &pclk->hw);
> > if (ret) {
> > pclk = ERR_PTR(ret);
> > --
> > 2.13.2
> >
>
> It also fixes the issue introduced in commit 282a4e4 ("platform/x86:
> Enable Atom PMC platform clocks") that causes no audio on Baytrail.
>
> Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Excellent, thank you Enric. Pierre, any objections to this going in to
4.13 now and stable back to 4.12?
--
Darren Hart
VMware Open Source Technology Center
next prev parent reply other threads:[~2017-07-10 23:54 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-10 20:38 [PATCH] clk: x86: Do not gate clocks enabled by the firmware Carlo Caione
2017-07-10 22:31 ` Enric Balletbo Serra
2017-07-10 23:54 ` Darren Hart [this message]
2017-07-11 1:29 ` Stephen Boyd
2017-07-11 1:38 ` Darren Hart
2017-07-11 8:09 ` Carlo Caione
2017-07-24 13:49 ` Pierre-Louis Bossart
2017-07-24 14:02 ` Andy Shevchenko
2017-07-24 14:07 ` Pierre-Louis Bossart
2017-07-24 15:02 ` Enric Balletbo Serra
2017-07-24 16:26 ` Pierre-Louis Bossart
2017-07-24 16:33 ` Enric Balletbo Serra
2017-07-24 16:44 ` Pierre-Louis Bossart
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=20170710235403.GB25390@fury \
--to=dvhart@infradead.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=carlo@caione.org \
--cc=carlo@endlessm.com \
--cc=eballetbo@gmail.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux@endlessm.com \
--cc=mturquette@baylibre.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=sboyd@codeaurora.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