Skip to content
Snippets Groups Projects
Commit d31fd43c authored by Carlo Caione's avatar Carlo Caione Committed by Stephen Boyd
Browse files

clk: x86: Do not gate clocks enabled by the firmware


Read the enable register to determine if the clock is already in use by
the firmware. In this case avoid gating the clock.

Tested-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarDarren Hart (VMware) <dvhart@infradead.org>
Signed-off-by: default avatarCarlo Caione <carlo@endlessm.com>
Fixes: 282a4e4c ("platform/x86: Enable Atom PMC platform clocks")
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent f905293d
No related branches found
No related tags found
No related merge requests found
......@@ -186,6 +186,13 @@ 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 the clock was already enabled by the firmware mark it as critical
* to avoid it being gated by the clock framework if no driver owns it.
*/
if (plt_clk_is_enabled(&pclk->hw))
init.flags |= CLK_IS_CRITICAL;
ret = devm_clk_hw_register(&pdev->dev, &pclk->hw);
if (ret) {
pclk = ERR_PTR(ret);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment