Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 184647
b: refs/heads/master
c: 69ecefc
h: refs/heads/master
i:
  184645: eaf2d8e
  184643: cf59b57
  184639: 15577a5
v: v3
  • Loading branch information
Paul Walmsley committed Jan 27, 2010
1 parent 8c46a61 commit 2183e6b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4b1f76ed4f8012929494261eb6923b3c98554a9a
refs/heads/master: 69ecefca514c318d0ce993c48ffa3bad009c7b9b
17 changes: 17 additions & 0 deletions trunk/arch/arm/mach-omap2/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,20 @@ void omap2_clk_disable_unused(struct clk *clk)
pwrdm_clkdm_state_switch(clk->clkdm);
}
#endif

/* Common data */

struct clk_functions omap2_clk_functions = {
.clk_enable = omap2_clk_enable,
.clk_disable = omap2_clk_disable,
.clk_round_rate = omap2_clk_round_rate,
.clk_set_rate = omap2_clk_set_rate,
.clk_set_parent = omap2_clk_set_parent,
.clk_disable_unused = omap2_clk_disable_unused,
#ifdef CONFIG_CPU_FREQ
/* These will be removed when the OPP code is integrated */
.clk_init_cpufreq_table = omap2_clk_init_cpufreq_table,
.clk_exit_cpufreq_table = omap2_clk_exit_cpufreq_table,
#endif
};

7 changes: 7 additions & 0 deletions trunk/arch/arm/mach-omap2/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,12 @@ extern const struct clksel_rate gpt_32k_rates[];
extern const struct clksel_rate gpt_sys_rates[];
extern const struct clksel_rate gfx_l3_rates[];

#if defined(CONFIG_ARCH_OMAP24XX) && defined(CONFIG_CPU_FREQ)
extern void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table);
extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table);
#else
#define omap2_clk_init_cpufreq_table 0
#define omap2_clk_exit_cpufreq_table 0
#endif

#endif
23 changes: 8 additions & 15 deletions trunk/arch/arm/mach-omap2/clock2xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,13 +453,16 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate)
*/
static struct cpufreq_frequency_table *freq_table;

void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
void omap2xxx_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
{
const struct prcm_config *prcm;
long sys_ck_rate;
int i = 0;
int tbl_sz = 0;

if (!cpu_is_omap2xxx())
return;

sys_ck_rate = clk_get_rate(sclk);

for (prcm = rate_table; prcm->mpu_speed; prcm++) {
Expand Down Expand Up @@ -516,26 +519,16 @@ void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
*table = &freq_table[0];
}

void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table)
void omap2xxx_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table)
{
if (!cpu_is_omap2xxx())
return;

kfree(freq_table);
}

#endif

struct clk_functions omap2_clk_functions = {
.clk_enable = omap2_clk_enable,
.clk_disable = omap2_clk_disable,
.clk_round_rate = omap2_clk_round_rate,
.clk_set_rate = omap2_clk_set_rate,
.clk_set_parent = omap2_clk_set_parent,
.clk_disable_unused = omap2_clk_disable_unused,
#ifdef CONFIG_CPU_FREQ
.clk_init_cpufreq_table = omap2_clk_init_cpufreq_table,
.clk_exit_cpufreq_table = omap2_clk_exit_cpufreq_table,
#endif
};

static u32 omap2_get_apll_clkin(void)
{
u32 aplls, srate = 0;
Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/arm/mach-omap2/clock34xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,6 @@ int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate)
*/
#if defined(CONFIG_ARCH_OMAP3)

struct clk_functions omap2_clk_functions = {
.clk_enable = omap2_clk_enable,
.clk_disable = omap2_clk_disable,
.clk_round_rate = omap2_clk_round_rate,
.clk_set_rate = omap2_clk_set_rate,
.clk_set_parent = omap2_clk_set_parent,
.clk_disable_unused = omap2_clk_disable_unused,
};

/*
* Set clocks for bypass mode for reboot to work.
*/
Expand Down
9 changes: 0 additions & 9 deletions trunk/arch/arm/mach-omap2/clock44xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,6 @@
#include <linux/errno.h>
#include "clock.h"

struct clk_functions omap2_clk_functions = {
.clk_enable = omap2_clk_enable,
.clk_disable = omap2_clk_disable,
.clk_round_rate = omap2_clk_round_rate,
.clk_set_rate = omap2_clk_set_rate,
.clk_set_parent = omap2_clk_set_parent,
.clk_disable_unused = omap2_clk_disable_unused,
};

const struct clkops clkops_noncore_dpll_ops = {
.enable = &omap3_noncore_dpll_enable,
.disable = &omap3_noncore_dpll_disable,
Expand Down

0 comments on commit 2183e6b

Please sign in to comment.