summaryrefslogtreecommitdiffstats
path: root/drivers/clk/ti/dpll.c
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2019-01-15 11:15:15 +0200
committerTero Kristo <t-kristo@ti.com>2019-02-15 16:46:22 +0200
commitead478250b950f1f082d4cb57bed3adeacfe53c3 (patch)
tree5649053515fe4864839d2d3ea1baed0fbe14a7cd /drivers/clk/ti/dpll.c
parent8aa09cf322c196df95b52ed63c4cae605296f343 (diff)
downloadlinux-ead478250b950f1f082d4cb57bed3adeacfe53c3.tar.gz
linux-ead478250b950f1f082d4cb57bed3adeacfe53c3.tar.bz2
linux-ead478250b950f1f082d4cb57bed3adeacfe53c3.zip
clk: ti: generalize the init sequence of clk_hw_omap clocks
Add a generic API for initializing clocks of clk_hw_omap type clocks, and convert the whole TI clock driver suite to use this for registering the clocks. Also, get rid of the now redundant API for adding the clocks to the OMAP HW clocks list; instead this is used directly from the register API. Signed-off-by: Tero Kristo <t-kristo@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Tested-by: Keerthy <j-keerthy@ti.com>
Diffstat (limited to 'drivers/clk/ti/dpll.c')
-rw-r--r--drivers/clk/ti/dpll.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c
index 6c3329bc116f..659dadb23279 100644
--- a/drivers/clk/ti/dpll.c
+++ b/drivers/clk/ti/dpll.c
@@ -192,10 +192,9 @@ static void __init _register_dpll(void *user,
dd->clk_bypass = __clk_get_hw(clk);
/* register the clock */
- clk = ti_clk_register(NULL, &clk_hw->hw, node->name);
+ clk = ti_clk_register_omap_hw(NULL, &clk_hw->hw, node->name);
if (!IS_ERR(clk)) {
- omap2_init_clk_hw_omap_clocks(&clk_hw->hw);
of_clk_add_provider(node, of_clk_src_simple_get, clk);
kfree(clk_hw->hw.init->parent_names);
kfree(clk_hw->hw.init);
@@ -265,14 +264,12 @@ static void _register_dpll_x2(struct device_node *node,
#endif
/* register the clock */
- clk = ti_clk_register(NULL, &clk_hw->hw, name);
+ clk = ti_clk_register_omap_hw(NULL, &clk_hw->hw, name);
- if (IS_ERR(clk)) {
+ if (IS_ERR(clk))
kfree(clk_hw);
- } else {
- omap2_init_clk_hw_omap_clocks(&clk_hw->hw);
+ else
of_clk_add_provider(node, of_clk_src_simple_get, clk);
- }
}
#endif