All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] clk: x86: Do not gate clocks enabled by the firmware
@ 2017-07-10 20:38 Carlo Caione
  2017-07-10 22:31 ` Enric Balletbo Serra
  0 siblings, 1 reply; 13+ messages in thread
From: Carlo Caione @ 2017-07-10 20:38 UTC (permalink / raw)
  To: mturquette, linux-clk, dvhart, pierre-louis.bossart, sboyd,
	linux, eballetbo, andriy.shevchenko
  Cc: Carlo Caione

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

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

end of thread, other threads:[~2017-07-24 16:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.