diff options
author | Mike Turquette <mturquette@linaro.org> | 2014-03-19 23:54:03 +0400 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2014-03-19 23:54:03 +0400 |
commit | 78761147987b2750b6a848c9719967df0c5eff73 (patch) | |
tree | 7abe3a7808c5708d8b46177f465a7b9d5097f90d /drivers/clk/hisilicon/clk-hi3620.c | |
parent | 9ce71ca10fb8aeb900aeb319dde05750467554bf (diff) | |
parent | 75af25f581b1ffc63e06cb01547b3141d4cd5f58 (diff) | |
download | linux-78761147987b2750b6a848c9719967df0c5eff73.tar.xz |
Merge tag 'clk-hisi' of https://git.kernel.org/pub/scm/linux/kernel/git/hzhuang1/linux into clk-next-hisilcon
updating clock drivers for Hisilicon
Diffstat (limited to 'drivers/clk/hisilicon/clk-hi3620.c')
-rw-r--r-- | drivers/clk/hisilicon/clk-hi3620.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/clk/hisilicon/clk-hi3620.c b/drivers/clk/hisilicon/clk-hi3620.c index 38faa469d288..233eba22187a 100644 --- a/drivers/clk/hisilicon/clk-hi3620.c +++ b/drivers/clk/hisilicon/clk-hi3620.c @@ -210,34 +210,25 @@ static struct hisi_gate_clock hi3620_seperated_gate_clks[] __initdata = { static void __init hi3620_clk_init(struct device_node *np) { - void __iomem *base; + struct hisi_clock_data *clk_data; - if (np) { - base = of_iomap(np, 0); - if (!base) { - pr_err("failed to map Hi3620 clock registers\n"); - return; - } - } else { - pr_err("failed to find Hi3620 clock node in DTS\n"); + clk_data = hisi_clk_init(np, HI3620_NR_CLKS); + if (!clk_data) return; - } - - hisi_clk_init(np, HI3620_NR_CLKS); hisi_clk_register_fixed_rate(hi3620_fixed_rate_clks, ARRAY_SIZE(hi3620_fixed_rate_clks), - base); + clk_data); hisi_clk_register_fixed_factor(hi3620_fixed_factor_clks, ARRAY_SIZE(hi3620_fixed_factor_clks), - base); + clk_data); hisi_clk_register_mux(hi3620_mux_clks, ARRAY_SIZE(hi3620_mux_clks), - base); + clk_data); hisi_clk_register_divider(hi3620_div_clks, ARRAY_SIZE(hi3620_div_clks), - base); + clk_data); hisi_clk_register_gate_sep(hi3620_seperated_gate_clks, ARRAY_SIZE(hi3620_seperated_gate_clks), - base); + clk_data); } CLK_OF_DECLARE(hi3620_clk, "hisilicon,hi3620-clock", hi3620_clk_init); |