[PATCH 3/3] clk: imx: scu: defer probe if scu pd is still not ready
Dong Aisheng
aisheng.dong at nxp.com
Tue Nov 24 05:08:02 EST 2020
The clocks registered by SCU clock protocol driver requires power domain
to be ready first. Query the SCU PD status to support -EPROBE_DEFER
properly.
Signed-off-by: Dong Aisheng <aisheng.dong at nxp.com>
---
drivers/clk/imx/clk-scu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/clk/imx/clk-scu.c b/drivers/clk/imx/clk-scu.c
index 1f5518b7ab39..846201f9b72d 100644
--- a/drivers/clk/imx/clk-scu.c
+++ b/drivers/clk/imx/clk-scu.c
@@ -163,6 +163,9 @@ int imx_clk_scu_init(struct device_node *np)
of_property_read_u32(np, "#clock-cells", &clk_cells);
if (clk_cells == 2) {
+ if (!imx_scu_pd_is_initialized())
+ return -EPROBE_DEFER;
+
for (i = 0; i < IMX_SC_R_LAST; i++)
INIT_LIST_HEAD(&imx_scu_clks[i]);
--
2.23.0
More information about the linux-arm-kernel
mailing list