From 4b2171876b6e93f32ad0576a07d823783ccd1f16 Mon Sep 17 00:00:00 2001 From: Rickard Strandqvist Date: Sun, 7 Dec 2014 22:49:34 +0100 Subject: ARM: OMAP2+: clkt2xxx_apll.c: Remove some unused functions 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 [tony@atomide.com: updated to fix a build warning] Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/clkt2xxx_apll.c | 71 ------------------------------------- 1 file changed, 71 deletions(-) (limited to 'arch/arm/mach-omap2/clkt2xxx_apll.c') diff --git a/arch/arm/mach-omap2/clkt2xxx_apll.c b/arch/arm/mach-omap2/clkt2xxx_apll.c index c78e893eba7d..02cb08875326 100644 --- a/arch/arm/mach-omap2/clkt2xxx_apll.c +++ b/arch/arm/mach-omap2/clkt2xxx_apll.c @@ -38,35 +38,6 @@ /* 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; -} - -- cgit v1.2.3