Skip to content

Commit abb5f3f

Browse files
committed
Revert "clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops"
This reverts commit 35b0fac. Alexander reports that it causes boot failures on i.MX8M Plus based boards (specifically imx8mp-tqma8mpql-mba8mpxl.dts). Reported-by: Alexander Stein <[email protected]> Cc: Chen-Yu Tsai <[email protected]> Fixes: 35b0fac ("clk: core: Honor CLK_OPS_PARENT_ENABLE for clk gate ops") Link: https://lore.kernel.org/r/12115951.O9o76ZdvQC@steina-w Signed-off-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 1a6052e commit abb5f3f

File tree

1 file changed

+0
-28
lines changed

1 file changed

+0
-28
lines changed

drivers/clk/clk.c

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,6 @@ static bool clk_core_rate_is_protected(struct clk_core *core)
196196
return core->protect_count;
197197
}
198198

199-
static int clk_core_prepare_enable(struct clk_core *core);
200-
static void clk_core_disable_unprepare(struct clk_core *core);
201-
202199
static bool clk_core_is_prepared(struct clk_core *core)
203200
{
204201
bool ret = false;
@@ -211,11 +208,7 @@ static bool clk_core_is_prepared(struct clk_core *core)
211208
return core->prepare_count;
212209

213210
if (!clk_pm_runtime_get(core)) {
214-
if (core->flags & CLK_OPS_PARENT_ENABLE)
215-
clk_core_prepare_enable(core->parent);
216211
ret = core->ops->is_prepared(core->hw);
217-
if (core->flags & CLK_OPS_PARENT_ENABLE)
218-
clk_core_disable_unprepare(core->parent);
219212
clk_pm_runtime_put(core);
220213
}
221214

@@ -251,13 +244,7 @@ static bool clk_core_is_enabled(struct clk_core *core)
251244
}
252245
}
253246

254-
if (core->flags & CLK_OPS_PARENT_ENABLE)
255-
clk_core_prepare_enable(core->parent);
256-
257247
ret = core->ops->is_enabled(core->hw);
258-
259-
if (core->flags & CLK_OPS_PARENT_ENABLE)
260-
clk_core_disable_unprepare(core->parent);
261248
done:
262249
if (core->rpm_enabled)
263250
pm_runtime_put(core->dev);
@@ -825,9 +812,6 @@ int clk_rate_exclusive_get(struct clk *clk)
825812
}
826813
EXPORT_SYMBOL_GPL(clk_rate_exclusive_get);
827814

828-
static int clk_core_enable_lock(struct clk_core *core);
829-
static void clk_core_disable_lock(struct clk_core *core);
830-
831815
static void clk_core_unprepare(struct clk_core *core)
832816
{
833817
lockdep_assert_held(&prepare_lock);
@@ -851,18 +835,12 @@ static void clk_core_unprepare(struct clk_core *core)
851835

852836
WARN(core->enable_count > 0, "Unpreparing enabled %s\n", core->name);
853837

854-
if (core->flags & CLK_OPS_PARENT_ENABLE)
855-
clk_core_enable_lock(core->parent);
856-
857838
trace_clk_unprepare(core);
858839

859840
if (core->ops->unprepare)
860841
core->ops->unprepare(core->hw);
861842

862843
trace_clk_unprepare_complete(core);
863-
864-
if (core->flags & CLK_OPS_PARENT_ENABLE)
865-
clk_core_disable_lock(core->parent);
866844
clk_core_unprepare(core->parent);
867845
clk_pm_runtime_put(core);
868846
}
@@ -912,19 +890,13 @@ static int clk_core_prepare(struct clk_core *core)
912890
if (ret)
913891
goto runtime_put;
914892

915-
if (core->flags & CLK_OPS_PARENT_ENABLE)
916-
clk_core_enable_lock(core->parent);
917-
918893
trace_clk_prepare(core);
919894

920895
if (core->ops->prepare)
921896
ret = core->ops->prepare(core->hw);
922897

923898
trace_clk_prepare_complete(core);
924899

925-
if (core->flags & CLK_OPS_PARENT_ENABLE)
926-
clk_core_disable_lock(core->parent);
927-
928900
if (ret)
929901
goto unprepare;
930902
}

0 commit comments

Comments
 (0)