clk: imx8mp: tune the order of enet_qos_root_clk
authorPeng Fan <peng.fan@nxp.com>
Mon, 15 Aug 2022 01:34:28 +0000 (09:34 +0800)
committerAbel Vesa <abel.vesa@linaro.org>
Fri, 2 Sep 2022 18:09:52 +0000 (21:09 +0300)
commitc68cd258a67730c24566b9688d7c134e67459ac6
tree8b899167b28f45845d9597c33a15353712a9bb4c
parent568035b01cfb107af8d2e4bd2fb9aea22cf5b868
clk: imx8mp: tune the order of enet_qos_root_clk

The enet_qos_root_clk takes sim_enet_root_clk as parent. When
registering enet_qos_root_clk, it will be put into clk orphan list,
because sim_enet_root_clk is not ready.

When sim_enet_root_clk is ready, clk_core_reparent_orphans_nolock will
set enet_qos_root_clk parent to sim_enet_root_clk.

Because CLK_OPS_PARENT_ENABLE is set, sim_enet_root_clk will be
enabled and disabled during the enet_qos_root_clk reparent phase.

All the above are correct. But with M7 booted early and using
enet, M7 enet feature will be broken, because clk driver probe phase
disable the needed clks, in case M7 firmware not configure
sim_enet_root_clk.

And tune the order would also save cpu cycles.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20220815013428.476015-1-peng.fan@oss.nxp.com
drivers/clk/imx/clk-imx8mp.c