summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuo Zeng <guo.zeng@csr.com>2015-08-04 14:45:27 +0000
committerMichael Turquette <mturquette@baylibre.com>2015-08-24 16:49:05 -0700
commitb1062298fea59dca23cdbcafaa5bed79c273d88f (patch)
tree4e8d5b3a464e0e7366dfb24c97cd2a267abeef7e
parent3922107c796164560b797ae8dece697b5b5e4c24 (diff)
downloadlinux-b1062298fea59dca23cdbcafaa5bed79c273d88f.tar.bz2
clk: atlas7: export mux clks so that consumers can get them
this patch makes mux clks can be referenced by device drivers. Signed-off-by: Guo Zeng <guo.zeng@csr.com> Signed-off-by: Barry Song <Barry.Song@csr.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r--drivers/clk/sirf/clk-atlas7.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/clk/sirf/clk-atlas7.c b/drivers/clk/sirf/clk-atlas7.c
index af33a9e94980..07b970ff50f1 100644
--- a/drivers/clk/sirf/clk-atlas7.c
+++ b/drivers/clk/sirf/clk-atlas7.c
@@ -1180,7 +1180,7 @@ static struct atlas7_unit_init_data unit_list[] __initdata = {
{ 141, "thcgum_sys", "sys_mux", 0, SIRFSOC_CLKC_LEAF_CLK_EN0_SET, 3, &leaf0_gate_lock },
};
-static struct clk *atlas7_clks[ARRAY_SIZE(unit_list)];
+static struct clk *atlas7_clks[ARRAY_SIZE(unit_list) + ARRAY_SIZE(mux_list)];
static int unit_clk_is_enabled(struct clk_hw *hw)
{
@@ -1613,6 +1613,7 @@ static void __init atlas7_clk_init(struct device_node *np)
sirfsoc_clk_vbase + mux->mux_offset,
mux->shift, mux->width,
mux->mux_flags, NULL);
+ atlas7_clks[ARRAY_SIZE(unit_list) + i] = clk;
BUG_ON(!clk);
}
@@ -1624,7 +1625,7 @@ static void __init atlas7_clk_init(struct device_node *np)
}
clk_data.clks = atlas7_clks;
- clk_data.clk_num = ARRAY_SIZE(unit_list);
+ clk_data.clk_num = ARRAY_SIZE(unit_list) + ARRAY_SIZE(mux_list);
ret = of_clk_add_provider(np, of_clk_src_onecell_get, &clk_data);
BUG_ON(ret);