clk: imx: Mark the snvs clock as critical by default
Subsystems (3)
PATCH 1/1 clk: imx: Mark the snvs clock as critical by default
The SNVS moudule is not used only by the linux, it may also used by other SW component is secure world. No sense to gate it by linux, so mark it as critical clock.
--- drivers/clk/imx/clk-imx7d.c | 2 +- drivers/clk/imx/clk-imx8mm.c | 2 +- drivers/clk/imx/clk-imx8mn.c | 2 +- drivers/clk/imx/clk-imx8mp.c | 2 +- drivers/clk/imx/clk-imx8mq.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
drivers/clk/imx/clk-imx7d.c +1 -1
@@ -782,7 +782,7 @@ static void __init imx7d_clocks_init(struct device_node *ccm_node) hws[IMX7D_DRAM_PHYM_ALT_ROOT_CLK ] =imx_clk_hw_gate2_flags ("dram_phym_alt_root_clk" ,"dram_phym_alt_post_div" , base +0x4130 ,0 ,CLK_IS_CRITICAL |CLK_OPS_PARENT_ENABLE ); hws[IMX7D_DRAM_ALT_ROOT_CLK ] =imx_clk_hw_gate2_flags ("dram_alt_root_clk" ,"dram_alt_post_div" , base +0x4130 ,0 ,CLK_IS_CRITICAL |CLK_OPS_PARENT_ENABLE ); hws[IMX7D_OCOTP_CLK ] =imx_clk_hw_gate4 ("ocotp_clk" ,"ipg_root_clk" , base +0x4230 ,0 ); - hws[IMX7D_SNVS_CLK ] =imx_clk_hw_gate4 ("snvs_clk" ,"ipg_root_clk" , base +0x4250 ,0 ); + hws[IMX7D_SNVS_CLK ] =imx_clk_hw_gate2_flags ("snvs_clk" ,"ipg_root_clk" , base +0x4250 ,0 ,CLK_IS_CRITICAL ); hws[IMX7D_MU_ROOT_CLK ] =imx_clk_hw_gate4 ("mu_root_clk" ,"ipg_root_clk" , base +0x4270 ,0 ); hws[IMX7D_CAAM_CLK ] =imx_clk_hw_gate4 ("caam_clk" ,"ipg_root_clk" , base +0x4240 ,0 ); hws[IMX7D_USB_HSIC_ROOT_CLK ] =imx_clk_hw_gate4 ("usb_hsic_root_clk" ,"usb_hsic_post_div" , base +0x4690 ,0 );
drivers/clk/imx/clk-imx8mm.c +1 -1
@@ -560,7 +560,7 @@ static int imx8mm_clocks_probe(struct platform_device *pdev) hws[IMX8MM_CLK_SAI5_IPG ] =imx_clk_hw_gate2_shared2 ("sai5_ipg_clk" ,"ipg_audio_root" , base +0x4370 ,0 , &share_count_sai5); hws[IMX8MM_CLK_SAI6_ROOT ] =imx_clk_hw_gate2_shared2 ("sai6_root_clk" ,"sai6" , base +0x4380 ,0 , &share_count_sai6); hws[IMX8MM_CLK_SAI6_IPG ] =imx_clk_hw_gate2_shared2 ("sai6_ipg_clk" ,"ipg_audio_root" , base +0x4380 ,0 , &share_count_sai6); - hws[IMX8MM_CLK_SNVS_ROOT ] =imx_clk_hw_gate4 ("snvs_root_clk" ,"ipg_root" , base +0x4470 ,0 ); + hws[IMX8MM_CLK_SNVS_ROOT ] =imx_clk_hw_gate2_flags ("snvs_root_clk" ,"ipg_root" , base +0x4470 ,0 ,CLK_IS_CRITICAL ); hws[IMX8MM_CLK_UART1_ROOT ] =imx_clk_hw_gate4 ("uart1_root_clk" ,"uart1" , base +0x4490 ,0 ); hws[IMX8MM_CLK_UART2_ROOT ] =imx_clk_hw_gate4 ("uart2_root_clk" ,"uart2" , base +0x44a0 ,0 ); hws[IMX8MM_CLK_UART3_ROOT ] =imx_clk_hw_gate4 ("uart3_root_clk" ,"uart3" , base +0x44b0 ,0 );
drivers/clk/imx/clk-imx8mn.c +1 -1
@@ -522,7 +522,7 @@ static int imx8mn_clocks_probe(struct platform_device *pdev) hws[IMX8MN_CLK_SAI5_IPG ] =imx_clk_hw_gate2_shared2 ("sai5_ipg_clk" ,"ipg_audio_root" , base +0x4370 ,0 , &share_count_sai5); hws[IMX8MN_CLK_SAI6_ROOT ] =imx_clk_hw_gate2_shared2 ("sai6_root_clk" ,"sai6" , base +0x4380 ,0 , &share_count_sai6); hws[IMX8MN_CLK_SAI6_IPG ] =imx_clk_hw_gate2_shared2 ("sai6_ipg_clk" ,"ipg_audio_root" , base +0x4380 ,0 , &share_count_sai6); - hws[IMX8MN_CLK_SNVS_ROOT ] =imx_clk_hw_gate4 ("snvs_root_clk" ,"ipg_root" , base +0x4470 ,0 ); + hws[IMX8MN_CLK_SNVS_ROOT ] =imx_clk_hw_gate2_flags ("snvs_root_clk" ,"ipg_root" , base +0x4470 ,0 ,CLK_IS_CRITICAL ); hws[IMX8MN_CLK_UART1_ROOT ] =imx_clk_hw_gate4 ("uart1_root_clk" ,"uart1" , base +0x4490 ,0 ); hws[IMX8MN_CLK_UART2_ROOT ] =imx_clk_hw_gate4 ("uart2_root_clk" ,"uart2" , base +0x44a0 ,0 ); hws[IMX8MN_CLK_UART3_ROOT ] =imx_clk_hw_gate4 ("uart3_root_clk" ,"uart3" , base +0x44b0 ,0 );
drivers/clk/imx/clk-imx8mp.c +1 -1
@@ -654,7 +654,7 @@ static int imx8mp_clocks_probe(struct platform_device *pdev) hws[IMX8MP_CLK_SIM_ENET_ROOT ] =imx_clk_hw_gate4 ("sim_enet_root_clk" ,"enet_axi" , ccm_base +0x4400 ,0 ); hws[IMX8MP_CLK_GPU2D_ROOT ] =imx_clk_hw_gate4 ("gpu2d_root_clk" ,"gpu2d_core" , ccm_base +0x4450 ,0 ); hws[IMX8MP_CLK_GPU3D_ROOT ] =imx_clk_hw_gate4 ("gpu3d_root_clk" ,"gpu3d_core" , ccm_base +0x4460 ,0 ); - hws[IMX8MP_CLK_SNVS_ROOT ] =imx_clk_hw_gate4 ("snvs_root_clk" ,"ipg_root" , ccm_base +0x4470 ,0 ); + hws[IMX8MP_CLK_SNVS_ROOT ] =imx_clk_hw_gate2_flags ("snvs_root_clk" ,"ipg_root" , ccm_base +0x4470 ,0 ,CLK_IS_CRITICAL ); hws[IMX8MP_CLK_UART1_ROOT ] =imx_clk_hw_gate4 ("uart1_root_clk" ,"uart1" , ccm_base +0x4490 ,0 ); hws[IMX8MP_CLK_UART2_ROOT ] =imx_clk_hw_gate4 ("uart2_root_clk" ,"uart2" , ccm_base +0x44a0 ,0 ); hws[IMX8MP_CLK_UART3_ROOT ] =imx_clk_hw_gate4 ("uart3_root_clk" ,"uart3" , ccm_base +0x44b0 ,0 );
drivers/clk/imx/clk-imx8mq.c +1 -1
@@ -557,7 +557,7 @@ static int imx8mq_clocks_probe(struct platform_device *pdev) hws[IMX8MQ_CLK_SAI5_IPG ] =imx_clk_hw_gate2_shared2 ("sai5_ipg_clk" ,"ipg_audio_root" , base +0x4370 ,0 , &share_count_sai5); hws[IMX8MQ_CLK_SAI6_ROOT ] =imx_clk_hw_gate2_shared2 ("sai6_root_clk" ,"sai6" , base +0x4380 ,0 , &share_count_sai6); hws[IMX8MQ_CLK_SAI6_IPG ] =imx_clk_hw_gate2_shared2 ("sai6_ipg_clk" ,"ipg_audio_root" , base +0x4380 ,0 , &share_count_sai6); - hws[IMX8MQ_CLK_SNVS_ROOT ] =imx_clk_hw_gate4 ("snvs_root_clk" ,"ipg_root" , base +0x4470 ,0 ); + hws[IMX8MQ_CLK_SNVS_ROOT ] =imx_clk_hw_gate2_flags ("snvs_root_clk" ,"ipg_root" , base +0x4470 ,0 ,CLK_IS_CRITICAL ); hws[IMX8MQ_CLK_UART1_ROOT ] =imx_clk_hw_gate4 ("uart1_root_clk" ,"uart1" , base +0x4490 ,0 ); hws[IMX8MQ_CLK_UART2_ROOT ] =imx_clk_hw_gate4 ("uart2_root_clk" ,"uart2" , base +0x44a0 ,0 ); hws[IMX8MQ_CLK_UART3_ROOT ] =imx_clk_hw_gate4 ("uart3_root_clk" ,"uart3" , base +0x44b0 ,0 );
Signature · 1 line
2.26.2
Stephen Boyd
maintainerQuoting Jacky Bai (2022-03-08 02:17:14)
Quoted 3 lines
The SNVS moudule is not used only by the linux, it may also used by other SW component is secure world. No sense to gate it by linux, so mark it as critical clock.
Does it make sense to even populate it in the kernel then? Presumably nobody is going to use it.
Quoted 9 lines
Subject: Re: [PATCH] clk: imx: Mark the snvs clock as critical by default
Quoting Jacky Bai (2022-03-08 02:17:14)
Quoted 3 lines
The SNVS moudule is not used only by the linux, it may also used by other SW component is secure world. No sense to gate it by linux, so mark it as critical clock.
Does it make sense to even populate it in the kernel then? Presumably nobody is going to use it.
For such clocks, IMO, no sense to populate it in linux kernel. but it is already added there, and referenced in dts file, so I just mark it CRITICAL to minimize the code changes. ^_^
BR
Jacky Bai