linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] clk: imx8mq: Mark AHB clock as critical
@ 2019-07-30  7:22 Abel Vesa
  2019-07-30 17:52 ` Stephen Boyd
  2019-08-03 15:04 ` Shawn Guo
  0 siblings, 2 replies; 5+ messages in thread
From: Abel Vesa @ 2019-07-30  7:22 UTC (permalink / raw)
  To: Mike Turquette, Stephen Boyd, Shawn Guo, Sascha Hauer,
	Fabio Estevam, Guido Gunther, Anson Huang
  Cc: linux-clk, linux-arm-kernel, Linux Kernel Mailing List, Abel Vesa

Initially, the TMU_ROOT clock was marked as critical, which automatically
made the AHB clock to stay always on. Since the TMU_ROOT clock is not
marked as critical anymore, following commit:

431bdd1df48e ("clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT")

all the clocks that derive from ipg_root clock (and implicitly ahb clock)
would also have to enable, along with their own gate, the AHB clock.

But considering that AHB is actually a bus that has to be always on, we mark
it as critical in the clock provider driver and then all the clocks that
derive from it can be controlled through the dedicated per IP gate which
follows after the ipg_root clock.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Tested-by: Daniel Baluta <daniel.baluta@nxp.com>
Fixes: 431bdd1df48e ("clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT")
---

Changes since v2:
 * added a more detailed commit message and mentioned the commit
   that this change is fixing

 drivers/clk/imx/clk-imx8mq.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/clk/imx/clk-imx8mq.c b/drivers/clk/imx/clk-imx8mq.c
index 4328c22..04302f2 100644
--- a/drivers/clk/imx/clk-imx8mq.c
+++ b/drivers/clk/imx/clk-imx8mq.c
@@ -406,7 +406,8 @@ static int imx8mq_clocks_probe(struct platform_device *pdev)
 	clks[IMX8MQ_CLK_NOC_APB] = imx8m_clk_composite_critical("noc_apb", imx8mq_noc_apb_sels, base + 0x8d80);
 
 	/* AHB */
-	clks[IMX8MQ_CLK_AHB] = imx8m_clk_composite("ahb", imx8mq_ahb_sels, base + 0x9000);
+	/* AHB clock is used by the AHB bus therefore marked as critical */
+	clks[IMX8MQ_CLK_AHB] = imx8m_clk_composite_critical("ahb", imx8mq_ahb_sels, base + 0x9000);
 	clks[IMX8MQ_CLK_AUDIO_AHB] = imx8m_clk_composite("audio_ahb", imx8mq_audio_ahb_sels, base + 0x9100);
 
 	/* IPG */
-- 
2.7.4


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

* Re: [PATCH v3] clk: imx8mq: Mark AHB clock as critical
  2019-07-30  7:22 [PATCH v3] clk: imx8mq: Mark AHB clock as critical Abel Vesa
@ 2019-07-30 17:52 ` Stephen Boyd
  2019-07-30 18:38   ` Abel Vesa
  2019-08-03 15:04 ` Shawn Guo
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Boyd @ 2019-07-30 17:52 UTC (permalink / raw)
  To: Abel Vesa, Anson Huang, Fabio Estevam, Guido Gunther,
	Mike Turquette, Sascha Hauer, Shawn Guo
  Cc: linux-clk, linux-arm-kernel, Linux Kernel Mailing List, Abel Vesa

Quoting Abel Vesa (2019-07-30 00:22:55)
> Initially, the TMU_ROOT clock was marked as critical, which automatically
> made the AHB clock to stay always on. Since the TMU_ROOT clock is not
> marked as critical anymore, following commit:
> 
> 431bdd1df48e ("clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT")
> 
> all the clocks that derive from ipg_root clock (and implicitly ahb clock)
> would also have to enable, along with their own gate, the AHB clock.
> 
> But considering that AHB is actually a bus that has to be always on, we mark
> it as critical in the clock provider driver and then all the clocks that
> derive from it can be controlled through the dedicated per IP gate which
> follows after the ipg_root clock.
> 
> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
> Tested-by: Daniel Baluta <daniel.baluta@nxp.com>
> Fixes: 431bdd1df48e ("clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT")
> ---
> 

Should I just apply this to clk-fixes branch?


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

* Re: [PATCH v3] clk: imx8mq: Mark AHB clock as critical
  2019-07-30 17:52 ` Stephen Boyd
@ 2019-07-30 18:38   ` Abel Vesa
  2019-07-30 21:40     ` Stephen Boyd
  0 siblings, 1 reply; 5+ messages in thread
From: Abel Vesa @ 2019-07-30 18:38 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Anson Huang, Fabio Estevam, Guido Gunther, Mike Turquette,
	Sascha Hauer, Shawn Guo, linux-clk, linux-arm-kernel,
	Linux Kernel Mailing List

On 19-07-30 10:52:30, Stephen Boyd wrote:
> Quoting Abel Vesa (2019-07-30 00:22:55)
> > Initially, the TMU_ROOT clock was marked as critical, which automatically
> > made the AHB clock to stay always on. Since the TMU_ROOT clock is not
> > marked as critical anymore, following commit:
> > 
> > 431bdd1df48e ("clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT")
> > 
> > all the clocks that derive from ipg_root clock (and implicitly ahb clock)
> > would also have to enable, along with their own gate, the AHB clock.
> > 
> > But considering that AHB is actually a bus that has to be always on, we mark
> > it as critical in the clock provider driver and then all the clocks that
> > derive from it can be controlled through the dedicated per IP gate which
> > follows after the ipg_root clock.
> > 
> > Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
> > Tested-by: Daniel Baluta <daniel.baluta@nxp.com>
> > Fixes: 431bdd1df48e ("clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT")
> > ---
> > 
> 
> Should I just apply this to clk-fixes branch?
> 

Nope. The commit 431bdd1df48e is just in -next for now.
So this has to be taken by Shawn, I think.

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

* Re: [PATCH v3] clk: imx8mq: Mark AHB clock as critical
  2019-07-30 18:38   ` Abel Vesa
@ 2019-07-30 21:40     ` Stephen Boyd
  0 siblings, 0 replies; 5+ messages in thread
From: Stephen Boyd @ 2019-07-30 21:40 UTC (permalink / raw)
  To: Abel Vesa
  Cc: Anson Huang, Fabio Estevam, Guido Gunther, Mike Turquette,
	Sascha Hauer, Shawn Guo, linux-clk, linux-arm-kernel,
	Linux Kernel Mailing List

Quoting Abel Vesa (2019-07-30 11:38:18)
> On 19-07-30 10:52:30, Stephen Boyd wrote:
> > Quoting Abel Vesa (2019-07-30 00:22:55)
> > > Initially, the TMU_ROOT clock was marked as critical, which automatically
> > > made the AHB clock to stay always on. Since the TMU_ROOT clock is not
> > > marked as critical anymore, following commit:
> > > 
> > > 431bdd1df48e ("clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT")
> > > 
> > > all the clocks that derive from ipg_root clock (and implicitly ahb clock)
> > > would also have to enable, along with their own gate, the AHB clock.
> > > 
> > > But considering that AHB is actually a bus that has to be always on, we mark
> > > it as critical in the clock provider driver and then all the clocks that
> > > derive from it can be controlled through the dedicated per IP gate which
> > > follows after the ipg_root clock.
> > > 
> > > Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
> > > Tested-by: Daniel Baluta <daniel.baluta@nxp.com>
> > > Fixes: 431bdd1df48e ("clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT")
> > > ---
> > > 
> > 
> > Should I just apply this to clk-fixes branch?
> > 
> 
> Nope. The commit 431bdd1df48e is just in -next for now.
> So this has to be taken by Shawn, I think.

Ah ok. I thought it was related to some other problem someone was seeing
in the rc series but you're right, it was just linux-next for them.


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

* Re: [PATCH v3] clk: imx8mq: Mark AHB clock as critical
  2019-07-30  7:22 [PATCH v3] clk: imx8mq: Mark AHB clock as critical Abel Vesa
  2019-07-30 17:52 ` Stephen Boyd
@ 2019-08-03 15:04 ` Shawn Guo
  1 sibling, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2019-08-03 15:04 UTC (permalink / raw)
  To: Abel Vesa
  Cc: Mike Turquette, Stephen Boyd, Sascha Hauer, Fabio Estevam,
	Guido Gunther, Anson Huang, linux-clk, linux-arm-kernel,
	Linux Kernel Mailing List

On Tue, Jul 30, 2019 at 10:22:55AM +0300, Abel Vesa wrote:
> Initially, the TMU_ROOT clock was marked as critical, which automatically
> made the AHB clock to stay always on. Since the TMU_ROOT clock is not
> marked as critical anymore, following commit:
> 
> 431bdd1df48e ("clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT")

The commit ID is not stable before the commit actually lands mainline.
I could possibly rebase the branch.

> 
> all the clocks that derive from ipg_root clock (and implicitly ahb clock)
> would also have to enable, along with their own gate, the AHB clock.
> 
> But considering that AHB is actually a bus that has to be always on, we mark
> it as critical in the clock provider driver and then all the clocks that
> derive from it can be controlled through the dedicated per IP gate which
> follows after the ipg_root clock.
> 
> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
> Tested-by: Daniel Baluta <daniel.baluta@nxp.com>
> Fixes: 431bdd1df48e ("clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT")

Dropped commit ID above and Fixes tag here, and applied the patch. 

Thanks for the fixing.

Shawn

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

end of thread, other threads:[~2019-08-03 15:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-30  7:22 [PATCH v3] clk: imx8mq: Mark AHB clock as critical Abel Vesa
2019-07-30 17:52 ` Stephen Boyd
2019-07-30 18:38   ` Abel Vesa
2019-07-30 21:40     ` Stephen Boyd
2019-08-03 15:04 ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).