aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clock34xx.h
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2009-01-28 14:27:42 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-02-08 12:50:40 -0500
commit0eafd4725cf5d828e76e474b8991a228bbdd3f2b (patch)
tree797186618cb16d1ddb3f42a1ac9c9d4f84bdc7c1 /arch/arm/mach-omap2/clock34xx.h
parent87246b7567f7d1951bfcea29875523ef435c0ebf (diff)
[ARM] OMAP3 clock: add omap3_core_dpll_m2_set_rate()
Add the omap3_core_dpll_m2_set_rate() function to the OMAP3 clock code, which calls into the SRAM function omap3_sram_configure_core_dpll() to change the CORE DPLL M2 divider. (SRAM code is necessary since rate changes on clocks upstream from the SDRC can glitch SDRAM accesses.) Use this function for the set_rate function pointer in the dpll3_m2_ck struct clk. With this function in place, PM/OPP code should be able to alter SDRAM speed via code similar to: clk_set_rate(&dpll3_m2_ck, target_rate). linux-omap source commit is 7f8b2b0f4fe52238c67d79dedcd2794dcef4dddd. Signed-off-by: Paul Walmsley <paul@pwsan.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-omap2/clock34xx.h')
-rw-r--r--arch/arm/mach-omap2/clock34xx.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
index aadd296c05a2..681acf0427c1 100644
--- a/arch/arm/mach-omap2/clock34xx.h
+++ b/arch/arm/mach-omap2/clock34xx.h
@@ -34,6 +34,7 @@ static void omap3_dpll_deny_idle(struct clk *clk);
34static u32 omap3_dpll_autoidle_read(struct clk *clk); 34static u32 omap3_dpll_autoidle_read(struct clk *clk);
35static int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate); 35static int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate);
36static int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate); 36static int omap3_dpll4_set_rate(struct clk *clk, unsigned long rate);
37static int omap3_core_dpll_m2_set_rate(struct clk *clk, unsigned long rate);
37 38
38/* Maximum DPLL multiplier, divider values for OMAP3 */ 39/* Maximum DPLL multiplier, divider values for OMAP3 */
39#define OMAP3_MAX_DPLL_MULT 2048 40#define OMAP3_MAX_DPLL_MULT 2048
@@ -471,11 +472,7 @@ static const struct clksel div31_dpll3m2_clksel[] = {
471 { .parent = NULL } 472 { .parent = NULL }
472}; 473};
473 474
474/* 475/* DPLL3 output M2 - primary control point for CORE speed */
475 * DPLL3 output M2
476 * REVISIT: This DPLL output divider must be changed in SRAM, so until
477 * that code is ready, this should remain a 'read-only' clksel clock.
478 */
479static struct clk dpll3_m2_ck = { 476static struct clk dpll3_m2_ck = {
480 .name = "dpll3_m2_ck", 477 .name = "dpll3_m2_ck",
481 .ops = &clkops_null, 478 .ops = &clkops_null,
@@ -486,6 +483,8 @@ static struct clk dpll3_m2_ck = {
486 .clksel = div31_dpll3m2_clksel, 483 .clksel = div31_dpll3m2_clksel,
487 .flags = RATE_PROPAGATES, 484 .flags = RATE_PROPAGATES,
488 .clkdm_name = "dpll3_clkdm", 485 .clkdm_name = "dpll3_clkdm",
486 .round_rate = &omap2_clksel_round_rate,
487 .set_rate = &omap3_core_dpll_m2_set_rate,
489 .recalc = &omap2_clksel_recalc, 488 .recalc = &omap2_clksel_recalc,
490}; 489};
491 490