clk: x86: Do not gate clocks enabled by the firmware
PATCH v2 1/1 clk: x86: Do not gate clocks enabled by the firmware
From: Carlo Caione <[email protected]>
Read the enable register to determine if the clock is already in use by the firmware. In this case avoid gating the clock.
--- drivers/clk/x86/clk-pmc-atom.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/clk/x86/clk-pmc-atom.c +7 -0
@@ -185,6 +185,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 is a 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);
Signature · 1 line
2.13.2
Quoted 6 lines · Carlo Caione
From: Carlo Caione <[email protected]>
Read the enable register to determine if the clock is already in use by
the firmware. In this case avoid gating the clock.
I suppose it should go via clock tree.
Quoted 29 lines
Signed-off-by Carlo Caione <[email protected]>---
drivers/clk/x86/clk-pmc-atom.c | 7 +++++++1 file changed, 7 insertions(+)drivers/clk/x86/clk-pmc- renamed from drivers/clk/x86/clk-pmc-atom.c +0
-0
atom.c
index2b60577703ef..3c73d2e564ca100644drivers/clk/x86/clk-pmc-atom.c +0
-0@@ -185,6 +185,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);drivers/clk/x86/clk-pmc-atom.c +2
-0+/* +* If the clock was already enabled by the firmware mark is a critical
drivers/clk/x86/clk-pmc-atom.c +1
-0+ * to avoid it being gated by the clock framework if nodriver owns it
drivers/clk/x86/clk-pmc-atom.c +4
-0+*/ +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);
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Darren Hart
Acked-byQuoted 18 lines · Andy Shevchenko
Quoted 6 lines · Carlo Caione
From: Carlo Caione <[email protected]>
Read the enable register to determine if the clock is already in use by
the firmware. In this case avoid gating the clock.Acked-by Andy Shevchenko <[email protected]>I suppose it should go via clock tree.
Quoted 6 lines
Signed-off-by Carlo Caione <[email protected]>---
drivers/clk/x86/clk-pmc-atom.c | 7 +++++++1 file changed, 7 insertions(+)
Quoted 14 lines
Quoted 13 lines
drivers/clk/x86/clk-pmc- renamed from drivers/clk/x86/clk-pmc-atom.c +0
-0
atom.c
index2b60577703ef..3c73d2e564ca100644drivers/clk/x86/clk-pmc-atom.c +0
-0@@ -185,6 +185,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);drivers/clk/x86/clk-pmc-atom.c +2
-0+/* +* If the clock was already enabled by the firmware mark is a Quoted 1 line
critical
Nit... I think this should read... "mark it as critical" ?
Quoted 2 lines
Quoted 2 lines
drivers/clk/x86/clk-pmc-atom.c +1
-0+ * to avoid it being gated by the clock framework if nodriver owns it
owns it.
Signature · 2 lines
Darren Hart VMware Open Source Technology Center
Quoted 36 lines · Darren Hart
Quoted 29 lines · Andy Shevchenko
Quoted 6 lines · Carlo Caione
From: Carlo Caione <[email protected]>
Read the enable register to determine if the clock is already in use by
the firmware. In this case avoid gating the clock.Acked-by Andy Shevchenko <[email protected]>I suppose it should go via clock tree.
Quoted 17 lines
Signed-off-by Carlo Caione <[email protected]>--- drivers/clk/x86/clk-pmc-atom.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/clk/x86/clk-pmc- renamed from drivers/clk/x86/clk-pmc-atom.c +0
-0
atom.c
index2b60577703ef..3c73d2e564ca100644drivers/clk/x86/clk-pmc-atom.c +0
-0@@ -185,6 +185,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);Quoted 3 lines
Quoted 3 lines
drivers/clk/x86/clk-pmc-atom.c +2
-0+/* +* If the clock was already enabled by the firmware mark is a critical
Nit... I think this should read... "mark it as critical" ?
Quoted 4 lines
Quoted 2 lines
Quoted 2 lines
+ * to avoid it being gated by the clock framework if no
driver owns itowns it.
Ooops. Yeah, submitting a v3 with better spelling and your ACKs.
Thanks,
Signature · 1 line
Carlo Caione | +39.340.80.30.096 | Endless