]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
clk: ti: move omap2_init_clk_clkdm under TI clock driver
authorTero Kristo <t-kristo@ti.com>
Fri, 30 Sep 2016 11:13:38 +0000 (14:13 +0300)
committerTero Kristo <t-kristo@ti.com>
Wed, 8 Mar 2017 10:59:30 +0000 (12:59 +0200)
This is not needed outside the driver, so move it inside it and remove
the prototype from the public header also.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/clock.c
drivers/clk/ti/clock.h
drivers/clk/ti/clockdomain.c
include/linux/clk/ti.h

index 6fac82609c96cd9e8ff7dcc0b50e98be5031bf06..ae5b23c19b834a58bbeba0547e0246d65a6943f5 100644 (file)
@@ -79,38 +79,6 @@ int __init omap2_clk_setup_ll_ops(void)
  * OMAP2+ specific clock functions
  */
 
-/* Public functions */
-
-/**
- * omap2_init_clk_clkdm - look up a clockdomain name, store pointer in clk
- * @clk: OMAP clock struct ptr to use
- *
- * Convert a clockdomain name stored in a struct clk 'clk' into a
- * clockdomain pointer, and save it into the struct clk.  Intended to be
- * called during clk_register().  No return value.
- */
-void omap2_init_clk_clkdm(struct clk_hw *hw)
-{
-       struct clk_hw_omap *clk = to_clk_hw_omap(hw);
-       struct clockdomain *clkdm;
-       const char *clk_name;
-
-       if (!clk->clkdm_name)
-               return;
-
-       clk_name = __clk_get_name(hw->clk);
-
-       clkdm = clkdm_lookup(clk->clkdm_name);
-       if (clkdm) {
-               pr_debug("clock: associated clk %s to clkdm %s\n",
-                        clk_name, clk->clkdm_name);
-               clk->clkdm = clkdm;
-       } else {
-               pr_debug("clock: could not associate clk %s to clkdm %s\n",
-                        clk_name, clk->clkdm_name);
-       }
-}
-
 /**
  * ti_clk_init_features - init clock features struct for the SoC
  *
index ee6d22507a3d7013a45f3882e3dde3e94f01a9b5..ecf82d86118c5026a36d3efa0220723da93c202b 100644 (file)
@@ -228,6 +228,7 @@ extern const struct clk_hw_omap_ops clkhwops_am35xx_ipss_wait;
 extern const struct clk_ops ti_clk_divider_ops;
 extern const struct clk_ops ti_clk_mux_ops;
 
+void omap2_init_clk_clkdm(struct clk_hw *hw);
 int omap2_clkops_enable_clkdm(struct clk_hw *hw);
 void omap2_clkops_disable_clkdm(struct clk_hw *hw);
 
index 6cf9dd189a924e9d74472a260f7e816585b0d43b..704157d8c0b721e15b10e0cbe4f133d7ce421dfc 100644 (file)
@@ -103,6 +103,36 @@ void omap2_clkops_disable_clkdm(struct clk_hw *hw)
        ti_clk_ll_ops->clkdm_clk_disable(clk->clkdm, hw->clk);
 }
 
+/**
+ * omap2_init_clk_clkdm - look up a clockdomain name, store pointer in clk
+ * @clk: OMAP clock struct ptr to use
+ *
+ * Convert a clockdomain name stored in a struct clk 'clk' into a
+ * clockdomain pointer, and save it into the struct clk.  Intended to be
+ * called during clk_register().  No return value.
+ */
+void omap2_init_clk_clkdm(struct clk_hw *hw)
+{
+       struct clk_hw_omap *clk = to_clk_hw_omap(hw);
+       struct clockdomain *clkdm;
+       const char *clk_name;
+
+       if (!clk->clkdm_name)
+               return;
+
+       clk_name = __clk_get_name(hw->clk);
+
+       clkdm = ti_clk_ll_ops->clkdm_lookup(clk->clkdm_name);
+       if (clkdm) {
+               pr_debug("clock: associated clk %s to clkdm %s\n",
+                        clk_name, clk->clkdm_name);
+               clk->clkdm = clkdm;
+       } else {
+               pr_debug("clock: could not associate clk %s to clkdm %s\n",
+                        clk_name, clk->clkdm_name);
+       }
+}
+
 static void __init of_ti_clockdomain_setup(struct device_node *node)
 {
        struct clk *clk;
index bc7fd8f0fb5dc2192715d76b0ee20558f266c03d..626ae94b7444f67ba3a1bce4bda6c974d64b9706 100644 (file)
@@ -238,7 +238,6 @@ struct ti_clk_ll_ops {
 
 #define to_clk_hw_omap(_hw) container_of(_hw, struct clk_hw_omap, hw)
 
-void omap2_init_clk_clkdm(struct clk_hw *clk);
 int omap2_clk_disable_autoidle_all(void);
 int omap2_clk_enable_autoidle_all(void);
 int omap2_clk_allow_idle(struct clk *clk);