12 #include <linux/kernel.h>
17 #include <linux/slab.h>
21 #define to_clk_apmu(clk) (container_of(clk, struct clk_apmu, clk))
30 static int clk_apmu_enable(
struct clk_hw *
hw)
34 unsigned long flags = 0;
40 writel_relaxed(data, apmu->
base);
43 spin_unlock_irqrestore(apmu->
lock, flags);
48 static void clk_apmu_disable(
struct clk_hw *
hw)
52 unsigned long flags = 0;
58 writel_relaxed(data, apmu->
base);
61 spin_unlock_irqrestore(apmu->
lock, flags);
65 .enable = clk_apmu_enable,
66 .disable = clk_apmu_disable,
74 struct clk_init_data init;
82 init.flags = CLK_SET_RATE_PARENT;
83 init.parent_names = (parent_name ? &parent_name :
NULL);
84 init.num_parents = (parent_name ? 1 : 0);
87 apmu->enable_mask = enable_mask;
89 apmu->hw.init = &
init;