diff options
author | Stephen Boyd <sboyd@codeaurora.org> | 2018-01-03 03:50:27 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@codeaurora.org> | 2018-01-05 02:13:24 +0300 |
commit | 9919d44ff2977d4da709282fa0ebedddaa3b8d85 (patch) | |
tree | d6f6bce4621942794d1c7fdbc368f8e6cd3ba5ca /drivers/clk/sunxi/clk-mod0.c | |
parent | e0af0c161000fa5914198d4cd1183bced68378f5 (diff) | |
download | linux-9919d44ff2977d4da709282fa0ebedddaa3b8d85.tar.xz |
clk: sunxi: Use CLK_IS_CRITICAL flag for critical clks
We'd like to privatize __clk_get(), but the sunxi clk driver is
calling this function to keep a reference held on the clk and
call clk_prepare_enable() on it. We support this design in the
clk core now with the CLK_IS_CRITICAL flag, so let's just use
that instead.
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/sunxi/clk-mod0.c')
-rw-r--r-- | drivers/clk/sunxi/clk-mod0.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c index 4417ae129ac7..a27c264cc9b4 100644 --- a/drivers/clk/sunxi/clk-mod0.c +++ b/drivers/clk/sunxi/clk-mod0.c @@ -15,7 +15,6 @@ */ #include <linux/clk.h> -#include <linux/clkdev.h> #include <linux/clk-provider.h> #include <linux/of_address.h> #include <linux/platform_device.h> @@ -155,7 +154,6 @@ static DEFINE_SPINLOCK(sun5i_a13_mbus_lock); static void __init sun5i_a13_mbus_setup(struct device_node *node) { - struct clk *mbus; void __iomem *reg; reg = of_iomap(node, 0); @@ -164,12 +162,9 @@ static void __init sun5i_a13_mbus_setup(struct device_node *node) return; } - mbus = sunxi_factors_register(node, &sun4i_a10_mod0_data, - &sun5i_a13_mbus_lock, reg); - /* The MBUS clocks needs to be always enabled */ - __clk_get(mbus); - clk_prepare_enable(mbus); + sunxi_factors_register_critical(node, &sun4i_a10_mod0_data, + &sun5i_a13_mbus_lock, reg); } CLK_OF_DECLARE(sun5i_a13_mbus, "allwinner,sun5i-a13-mbus-clk", sun5i_a13_mbus_setup); |