17 #include <linux/slab.h>
37 #define to_clk_pll(_hw) container_of(_hw, struct clk_pll, hw)
39 static int clk_pll_prepare(
struct clk_hw *
hw)
50 static void clk_pll_unprepare(
struct clk_hw *
hw)
57 static int clk_pll_enable(
struct clk_hw *
hw)
61 writel_relaxed(1 << 31, pll->
base +
CLR);
66 static void clk_pll_disable(
struct clk_hw *
hw)
70 writel_relaxed(1 << 31, pll->
base +
SET);
73 static unsigned long clk_pll_recalc_rate(
struct clk_hw *
hw,
74 unsigned long parent_rate)
81 static const struct clk_ops clk_pll_ops = {
82 .prepare = clk_pll_prepare,
83 .unprepare = clk_pll_unprepare,
84 .enable = clk_pll_enable,
85 .disable = clk_pll_disable,
86 .recalc_rate = clk_pll_recalc_rate,
94 struct clk_init_data init;
101 init.ops = &clk_pll_ops;
103 init.parent_names = (parent_name ? &parent_name:
NULL);
104 init.num_parents = (parent_name ? 1 : 0);
109 pll->hw.init = &
init;