clk: imx8mq: Mark AHB clock as critical
Subsystems (3)
PATCH v3 1/1 clk: imx8mq: Mark AHB clock as critical
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.
---
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(-)
drivers/clk/imx/clk-imx8mq.c +2 -1
@@ -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 */
Signature · 1 line
2.7.4
Stephen Boyd
maintainerQuoting Abel Vesa (2019-07-30 00:22:55)
Quoted 14 lines
Initially, the
TMU_ROOTclock was marked as critical, which automatically made the AHB clock to stay always on. Since theTMU_ROOTclock is not marked as critical anymore, following commit:
431bdd1df48e("clk: imx8mq: RemoveCLK_IS_CRITICALflag forIMX8MQ_CLK_TMU_ROOT")all the clocks that derive from
ipg_rootclock (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_rootclock.
Quoted 5 lines
Signed-off-by Abel Vesa <[email protected]>Tested-by Daniel Baluta <[email protected]>Fixes 431bdd1df48e ("clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT")---
Should I just apply this to clk-fixes branch?
Quoted 15 lines · Stephen Boyd
Quoting Abel Vesa (2019-07-30 00:22:55)
Quoted 14 lines
Initially, the
TMU_ROOTclock was marked as critical, which automatically made the AHB clock to stay always on. Since theTMU_ROOTclock is not marked as critical anymore, following commit:
431bdd1df48e("clk: imx8mq: RemoveCLK_IS_CRITICALflag forIMX8MQ_CLK_TMU_ROOT")all the clocks that derive from
ipg_rootclock (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_rootclock.
Quoted 8 lines
Quoted 5 lines
Signed-off-by Abel Vesa <[email protected]>Tested-by Daniel Baluta <[email protected]>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.
Stephen Boyd
maintainerQuoting Abel Vesa (2019-07-30 11:38:18)
Quoted 22 lines · Stephen Boyd
Quoted 21 lines
Quoting Abel Vesa (2019-07-30 00:22:55)
Quoted 19 lines
Initially, the
TMU_ROOTclock was marked as critical, which automatically made the AHB clock to stay always on. Since theTMU_ROOTclock is not marked as critical anymore, following commit:
431bdd1df48e("clk: imx8mq: RemoveCLK_IS_CRITICALflag forIMX8MQ_CLK_TMU_ROOT")all the clocks that derive from
ipg_rootclock (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_rootclock.Signed-off-by Abel Vesa <[email protected]>Tested-by Daniel Baluta <[email protected]>Fixes 431bdd1df48e ("clk: imx8mq: Remove CLK_IS_CRITICAL flag for IMX8MQ_CLK_TMU_ROOT")---
Quoted 5 lines
Quoted 2 lines
Should I just apply this to clk-fixes branch?
Nope. The commit
431bdd1df48eis 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.
Quoted 5 lines · Abel Vesa
Initially, the
TMU_ROOTclock was marked as critical, which automatically made the AHB clock to stay always on. Since theTMU_ROOTclock is not marked as critical anymore, following commit:
431bdd1df48e("clk: imx8mq: RemoveCLK_IS_CRITICALflag forIMX8MQ_CLK_TMU_ROOT")
The commit ID is not stable before the commit actually lands mainline. I could possibly rebase the branch.
Quoted 4 lines
all the clocks that derive from
ipg_rootclock (and implicitly ahb clock) would also have to enable, along with their own gate, the AHB clock.
Quoted 8 lines
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_rootclock.Signed-off-by Abel Vesa <[email protected]>Tested-by Daniel Baluta <[email protected]>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