clk: imx: Remove __init for imx_register_uart_clocks() API
Subsystems (3)
PATCH 1/2 clk: imx: Remove __init for imx_register_uart_clocks() API
From: Anson Huang <[email protected]>
Some of i.MX SoCs' clock driver use platform driver model, and they need to call imx_register_uart_clocks() API, so imx_register_uart_clocks() API should NOT be in .init section.
Signed-off-by Anson Huang <[email protected]>
--- drivers/clk/imx/clk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/clk/imx/clk.c +3 -3
@@ -123,8 +123,8 @@ void imx_cscmr1_fixup(u32 *val)return ; } -static int imx_keep_uart_clocks__initdata ; -static struct clk **const *imx_uart_clocks__initdata ; +static int imx_keep_uart_clocks; +static struct clk **const *imx_uart_clocks;static int __init imx_keep_uart_clocks_param (char *str) {
@@ -137,7 +137,7 @@ __setup_param("earlycon", imx_keep_uart_earlycon,__setup_param ("earlyprintk" , imx_keep_uart_earlyprintk, imx_keep_uart_clocks_param,0 ); -void __init imx_register_uart_clocks (struct clk **const clks[]) +void imx_register_uart_clocks (struct clk **const clks[]) {if (imx_keep_uart_clocks) {int i;
Signature · 1 line
2.7.4
PATCH 2/2 clk: imx8mq: Keep uart clocks on during system boot
From: Anson Huang <[email protected]>
Call imx_register_uart_clocks() API to keep uart clocks enabled when earlyprintk or earlycon is active.
Signed-off-by Anson Huang <[email protected]>
--- drivers/clk/imx/clk-imx8mq.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
drivers/clk/imx/clk-imx8mq.c +10 -0
@@ -272,6 +272,14 @@ static const char * const imx8mq_clko2_sels[] = {"osc_25m", "sys2_pll_200m", "systatic struct clk_onecell_data clk_data; +static struct clk **const uart_clks[] = { + &clks[IMX8MQ_CLK_UART1_ROOT ], + &clks[IMX8MQ_CLK_UART2_ROOT ], + &clks[IMX8MQ_CLK_UART3_ROOT ], + &clks[IMX8MQ_CLK_UART4_ROOT ], +NULL +}; +static int imx8mq_clocks_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;
@@ -555,6 +563,8 @@ static int imx8mq_clocks_probe(struct platform_device *pdev) err =of_clk_add_provider (np, of_clk_src_onecell_get, &clk_data);WARN_ON (err); +imx_register_uart_clocks (uart_clks); +return err; }
Signature · 1 line
2.7.4
Shawn Guo
AppliedQuoted 7 lines · On Wed, Jun 19, 2019 at 03:12:39PM +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_register_uart_clocks()API, soimx_register_uart_clocks()API should NOT be in .init section.Signed-off-by Anson Huang <[email protected]>
Applied both, thanks.