diff options
author | Michael Turquette <mturquette@baylibre.com> | 2016-04-28 21:00:52 +0200 |
---|---|---|
committer | Michael Turquette <mturquette@baylibre.com> | 2016-06-23 03:02:24 +0200 |
commit | e92f7cca446ec503251b58ad9a8b5592a2d927de (patch) | |
tree | 139c4559a63d9b35fbadbf78de8ebf4376aeeb45 /drivers/clk/meson/clkc.c | |
parent | clk: meson8b: rectify reg offsets with datasheet (diff) | |
download | linux-e92f7cca446ec503251b58ad9a8b5592a2d927de.tar.xz linux-e92f7cca446ec503251b58ad9a8b5592a2d927de.zip |
clk: meson8b: clean up fixed rate clocks
Remove the fixed_rate registration function and helpers from clkc.[ch].
Replace unnecessary configuration struct with static initialization of
the desired clock type.
While we're here, begin the transition to a proper platform_driver and
call of_clk_add_hw_provider with a shiny new struct clk_hw_onecell_data.
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Diffstat (limited to 'drivers/clk/meson/clkc.c')
-rw-r--r-- | drivers/clk/meson/clkc.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/drivers/clk/meson/clkc.c b/drivers/clk/meson/clkc.c index d920d410b51d..c6802fd23994 100644 --- a/drivers/clk/meson/clkc.c +++ b/drivers/clk/meson/clkc.c @@ -167,36 +167,6 @@ meson_clk_register_fixed_factor(const struct clk_conf *clk_conf, return clk; } -static struct clk * __init -meson_clk_register_fixed_rate(const struct clk_conf *clk_conf, - void __iomem *clk_base) -{ - struct clk *clk; - const struct fixed_rate_conf *fixed_rate_conf; - const struct parm *r; - unsigned long rate; - u32 reg; - - fixed_rate_conf = &clk_conf->conf.fixed_rate; - rate = fixed_rate_conf->rate; - - if (!rate) { - r = &fixed_rate_conf->rate_parm; - reg = readl(clk_base + clk_conf->reg_off + r->reg_off); - rate = PARM_GET(r->width, r->shift, reg); - } - - rate *= 1000000; - - clk = clk_register_fixed_rate(NULL, - clk_conf->clk_name, - clk_conf->num_parents - ? clk_conf->clks_parent[0] : NULL, - clk_conf->flags, rate); - - return clk; -} - void __init meson_clk_register_clks(const struct clk_conf *clk_confs, unsigned int nr_confs, void __iomem *clk_base) @@ -208,10 +178,6 @@ void __init meson_clk_register_clks(const struct clk_conf *clk_confs, const struct clk_conf *clk_conf = &clk_confs[i]; switch (clk_conf->clk_type) { - case CLK_FIXED_RATE: - clk = meson_clk_register_fixed_rate(clk_conf, - clk_base); - break; case CLK_FIXED_FACTOR: clk = meson_clk_register_fixed_factor(clk_conf, clk_base); |