clk: imx: Remove __init for imx_check_clocks() API
Subsystems (3)
PATCH 1/2 clk: imx: Remove __init for imx_check_clocks() API
From: Anson Huang <[email protected]>
Some of i.MX SoCs' clock driver use platform driver model, and they need to call imx_check_clocks() API, so imx_check_clocks() API should NOT be in .init section.
Signed-off-by Anson Huang <[email protected]>
--- drivers/clk/imx/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/imx/clk.c +1 -1
@@ -23,7 +23,7 @@ void __init imx_mmdc_mask_handshake(void __iomem *ccm_base,writel_relaxed (reg, ccm_base +CCM_CCDR ); } -void __init imx_check_clocks (struct clk *clks[],unsigned int count) +void imx_check_clocks (struct clk *clks[],unsigned int count) {unsigned i;
Signature · 1 line
2.7.4
PATCH 2/2 clk: imx8mq: Use imx_check_clocks() API directly
From: Anson Huang <[email protected]>
Use imx_check_clocks() API to check clocks directly.
Signed-off-by Anson Huang <[email protected]>
--- drivers/clk/imx/clk-imx8mq.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/clk/imx/clk-imx8mq.c +1 -5
@@ -278,7 +278,6 @@ static int imx8mq_clocks_probe(struct platform_device *pdev)struct device_node *np = dev->of_node;void __iomem *base;int err; -int i; clks[IMX8MQ_CLK_DUMMY ] =imx_clk_fixed ("dummy" ,0 ); clks[IMX8MQ_CLK_32K ] =of_clk_get_by_name (np,"ckil" );
@@ -548,10 +547,7 @@ static int imx8mq_clocks_probe(struct platform_device *pdev) clks[IMX8MQ_ARM_PLL_OUT ], clks[IMX8MQ_SYS1_PLL_800M]); -for (i =0 ; i <IMX8MQ_CLK_END ; i++) -if (IS_ERR (clks[i])) -pr_err ("i.MX8mq clk %u register failed with %ld\n" , - i,PTR_ERR (clks[i])); +imx_check_clocks (clks,ARRAY_SIZE (clks)); clk_data.clks = clks; clk_data.clk_num =ARRAY_SIZE (clks);
Signature · 1 line
2.7.4
Shawn Guo
AppliedQuoted 7 lines · On Mon, Jun 10, 2019 at 01:36:33PM +0800, [email protected] wrote:
From: Anson Huang <[email protected]>
Some of i.MX SoCs' clock driver use platform driver model, and they need to call
imx_check_clocks()API, soimx_check_clocks()API should NOT be in .init section.Signed-off-by Anson Huang <[email protected]>
Applied both, thanks.