@@ -857,15 +857,6 @@ static int _init_opt_clks(struct omap_hwmod *oh)
continue;
}
oc->_clk = c;
- /*
- * HACK: This needs a re-visit once clk_prepare() is implemented
- * to do something meaningful. Today its just a no-op.
- * If clk_prepare() is used at some point to do things like
- * voltage scaling etc, then this would have to be moved to
- * some point where subsystems like i2c and pmic become
- * available.
- */
- clk_prepare(oc->_clk);
}
return ret;
@@ -945,7 +936,7 @@ static void _enable_optional_clocks(struct omap_hwmod *oh)
if (oc->_clk) {
pr_debug("omap_hwmod: enable %s:%s\n", oc->role,
__clk_get_name(oc->_clk));
- clk_enable(oc->_clk);
+ clk_prepare_enable(oc->_clk);
}
}
@@ -960,7 +951,7 @@ static void _disable_optional_clocks(struct omap_hwmod *oh)
if (oc->_clk) {
pr_debug("omap_hwmod: disable %s:%s\n", oc->role,
__clk_get_name(oc->_clk));
- clk_disable(oc->_clk);
+ clk_disable_unprepare(oc->_clk);
}
}
At hwmod init, theres no reason why optional clocks should be left in clk_prepare()ed state as these are actually directly controlled by the drivers themselves. Let the drivers prepare/unprepare as well as enable/ disable them. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Cc: Benoit Cousson <bcousson@baylibre.com> --- arch/arm/mach-omap2/omap_hwmod.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)