ARM: OMAP2+: clkt2xxx_apll.c: Remove some unused functions
authorRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Sun, 7 Dec 2014 21:49:34 +0000 (22:49 +0100)
committerTony Lindgren <tony@atomide.com>
Wed, 7 Jan 2015 17:02:14 +0000 (09:02 -0800)
Removes some functions that are not used anywhere:
omap2_clk_apll54_disable() omap2_clk_apll96_disable()
omap2_clk_apll54_enable() omap2_clk_apll96_enable() omap2xxx_get_apll_clkin()
omap2_clk_apll96_recalc() omap2_clk_apll54_recalc()

This was partially found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
[tony@atomide.com: updated to fix a build warning]
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/clkt2xxx_apll.c
arch/arm/mach-omap2/clock2xxx.h

index c78e893eba7d07febfd546e6a0b0fc50bbd41374..02cb08875326dc59458dfe61db059d038227e44f 100644 (file)
 
 /* Private functions */
 
-/**
- * omap2xxx_clk_apll_locked - is the APLL locked?
- * @hw: struct clk_hw * of the APLL to check
- *
- * If the APLL IP block referred to by @hw indicates that it's locked,
- * return true; otherwise, return false.
- */
-static bool omap2xxx_clk_apll_locked(struct clk_hw *hw)
-{
-       struct clk_hw_omap *clk = to_clk_hw_omap(hw);
-       u32 r, apll_mask;
-
-       apll_mask = EN_APLL_LOCKED << clk->enable_bit;
-
-       r = omap2xxx_cm_get_pll_status();
-
-       return ((r & apll_mask) == apll_mask) ? true : false;
-}
-
-int omap2_clk_apll96_enable(struct clk_hw *hw)
-{
-       return omap2xxx_cm_apll96_enable();
-}
-
-int omap2_clk_apll54_enable(struct clk_hw *hw)
-{
-       return omap2xxx_cm_apll54_enable();
-}
-
 static void _apll96_allow_idle(struct clk_hw_omap *clk)
 {
        omap2xxx_cm_set_apll96_auto_low_power_stop();
@@ -87,28 +58,6 @@ static void _apll54_deny_idle(struct clk_hw_omap *clk)
        omap2xxx_cm_set_apll54_disable_autoidle();
 }
 
-void omap2_clk_apll96_disable(struct clk_hw *hw)
-{
-       omap2xxx_cm_apll96_disable();
-}
-
-void omap2_clk_apll54_disable(struct clk_hw *hw)
-{
-       omap2xxx_cm_apll54_disable();
-}
-
-unsigned long omap2_clk_apll54_recalc(struct clk_hw *hw,
-                                     unsigned long parent_rate)
-{
-       return (omap2xxx_clk_apll_locked(hw)) ? 54000000 : 0;
-}
-
-unsigned long omap2_clk_apll96_recalc(struct clk_hw *hw,
-                                     unsigned long parent_rate)
-{
-       return (omap2xxx_clk_apll_locked(hw)) ? 96000000 : 0;
-}
-
 /* Public data */
 const struct clk_hw_omap_ops clkhwops_apll54 = {
        .allow_idle     = _apll54_allow_idle,
@@ -120,23 +69,3 @@ const struct clk_hw_omap_ops clkhwops_apll96 = {
        .deny_idle      = _apll96_deny_idle,
 };
 
-/* Public functions */
-
-u32 omap2xxx_get_apll_clkin(void)
-{
-       u32 aplls, srate = 0;
-
-       aplls = omap2xxx_cm_get_pll_config();
-       aplls &= OMAP24XX_APLLS_CLKIN_MASK;
-       aplls >>= OMAP24XX_APLLS_CLKIN_SHIFT;
-
-       if (aplls == APLLS_CLKIN_19_2MHZ)
-               srate = 19200000;
-       else if (aplls == APLLS_CLKIN_13MHZ)
-               srate = 13000000;
-       else if (aplls == APLLS_CLKIN_12MHZ)
-               srate = 12000000;
-
-       return srate;
-}
-
index a090225ceeba9d1f09a79b34c5b763da363ae4a0..364a4cc7f11b131c724ac10cf65707de180cb1e3 100644 (file)
@@ -22,12 +22,7 @@ unsigned long omap2xxx_sys_clk_recalc(struct clk_hw *clk,
 unsigned long omap2_osc_clk_recalc(struct clk_hw *clk,
                                   unsigned long parent_rate);
 void omap2xxx_clkt_dpllcore_init(struct clk_hw *hw);
-unsigned long omap2_clk_apll54_recalc(struct clk_hw *hw,
-                                     unsigned long parent_rate);
-unsigned long omap2_clk_apll96_recalc(struct clk_hw *hw,
-                                     unsigned long parent_rate);
 unsigned long omap2xxx_clk_get_core_rate(void);
-u32 omap2xxx_get_apll_clkin(void);
 u32 omap2xxx_get_sysclkdiv(void);
 void omap2xxx_clk_prepare_for_reboot(void);
 void omap2xxx_clkt_vps_check_bootloader_rates(void);
@@ -48,9 +43,5 @@ int omap2430_clk_init(void);
 extern struct clk_hw *dclk_hw;
 int omap2_enable_osc_ck(struct clk_hw *hw);
 void omap2_disable_osc_ck(struct clk_hw *hw);
-int omap2_clk_apll96_enable(struct clk_hw *hw);
-int omap2_clk_apll54_enable(struct clk_hw *hw);
-void omap2_clk_apll96_disable(struct clk_hw *hw);
-void omap2_clk_apll54_disable(struct clk_hw *hw);
 
 #endif