Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4b217187 authored by Rickard Strandqvist's avatar Rickard Strandqvist Committed by Tony Lindgren
Browse files

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: default avatarRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
[tony@atomide.com: updated to fix a build warning]
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 97bf6af1
Loading
Loading
Loading
Loading
+0 −71
Original line number Diff line number Diff line
@@ -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;
}
+0 −9
Original line number Diff line number Diff line
@@ -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