Skip to content

Commit a740d73

Browse files
MrVanabelvesa
authored andcommitted
clk: imx: imx93: add mcore_booted module paratemter
Add mcore_booted boot parameter which could simplify AMP clock management. To i.MX93, there is CCM(clock control Module) to generate clock root clock, anatop(analog PLL module) to generate PLL, and LPCG (clock gating) to gate clocks to peripherals. As below: anatop->ccm->lpcg->peripheral Linux handles the clock management and the auxiliary core is under control of Linux. Although there is per hardware domain control for LPCG and CCM, auxiliary core normally only use LPCG hardware domain control to avoid linux gate off the clk to peripherals and leave CCM ana anatop to Linux. Reviewed-by: Ye Li <[email protected]> Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Abel Vesa <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Abel Vesa <[email protected]>
1 parent e040897 commit a740d73

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

drivers/clk/imx/clk-composite-93.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ struct clk_hw *imx93_clk_composite_flags(const char *name, const char * const *p
222222
hw = clk_hw_register_composite(NULL, name, parent_names, num_parents,
223223
mux_hw, &clk_mux_ro_ops, div_hw,
224224
&clk_divider_ro_ops, NULL, NULL, flags);
225-
} else {
225+
} else if (!mcore_booted) {
226226
gate = kzalloc(sizeof(*gate), GFP_KERNEL);
227227
if (!gate)
228228
goto fail;
@@ -238,6 +238,12 @@ struct clk_hw *imx93_clk_composite_flags(const char *name, const char * const *p
238238
&imx93_clk_composite_divider_ops, gate_hw,
239239
&imx93_clk_composite_gate_ops,
240240
flags | CLK_SET_RATE_NO_REPARENT);
241+
} else {
242+
hw = clk_hw_register_composite(NULL, name, parent_names, num_parents,
243+
mux_hw, &imx93_clk_composite_mux_ops, div_hw,
244+
&imx93_clk_composite_divider_ops, NULL,
245+
&imx93_clk_composite_gate_ops,
246+
flags | CLK_SET_RATE_NO_REPARENT);
241247
}
242248

243249
if (IS_ERR(hw))

drivers/clk/imx/clk-imx93.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ static struct platform_driver imx93_clk_driver = {
352352
},
353353
};
354354
module_platform_driver(imx93_clk_driver);
355+
module_param(mcore_booted, bool, 0444);
356+
MODULE_PARM_DESC(mcore_booted, "See Cortex-M core is booted or not");
355357

356358
MODULE_DESCRIPTION("NXP i.MX93 clock driver");
357359
MODULE_LICENSE("GPL v2");

0 commit comments

Comments
 (0)