aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/clock24xx.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/clock24xx.c')
-rw-r--r--arch/arm/mach-omap2/clock24xx.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
index bd77ef2d5ae9..91ad2070264d 100644
--- a/arch/arm/mach-omap2/clock24xx.c
+++ b/arch/arm/mach-omap2/clock24xx.c
@@ -339,7 +339,7 @@ static const struct clkops clkops_fixed = {
339 * Uses the current prcm set to tell if a rate is valid. 339 * Uses the current prcm set to tell if a rate is valid.
340 * You can go slower, but not faster within a given rate set. 340 * You can go slower, but not faster within a given rate set.
341 */ 341 */
342long omap2_dpllcore_round_rate(unsigned long target_rate) 342static long omap2_dpllcore_round_rate(unsigned long target_rate)
343{ 343{
344 u32 high, low, core_clk_src; 344 u32 high, low, core_clk_src;
345 345
@@ -550,7 +550,9 @@ static int omap2_select_table_rate(struct clk *clk, unsigned long rate)
550 550
551 /* Major subsystem dividers */ 551 /* Major subsystem dividers */
552 tmp = cm_read_mod_reg(CORE_MOD, CM_CLKSEL1) & OMAP24XX_CLKSEL_DSS2_MASK; 552 tmp = cm_read_mod_reg(CORE_MOD, CM_CLKSEL1) & OMAP24XX_CLKSEL_DSS2_MASK;
553 cm_write_mod_reg(prcm->cm_clksel1_core | tmp, CORE_MOD, CM_CLKSEL1); 553 cm_write_mod_reg(prcm->cm_clksel1_core | tmp, CORE_MOD,
554 CM_CLKSEL1);
555
554 if (cpu_is_omap2430()) 556 if (cpu_is_omap2430())
555 cm_write_mod_reg(prcm->cm_clksel_mdm, 557 cm_write_mod_reg(prcm->cm_clksel_mdm,
556 OMAP2430_MDM_MOD, CM_CLKSEL); 558 OMAP2430_MDM_MOD, CM_CLKSEL);
@@ -582,20 +584,20 @@ static struct clk_functions omap2_clk_functions = {
582 584
583static u32 omap2_get_apll_clkin(void) 585static u32 omap2_get_apll_clkin(void)
584{ 586{
585 u32 aplls, sclk = 0; 587 u32 aplls, srate = 0;
586 588
587 aplls = cm_read_mod_reg(PLL_MOD, CM_CLKSEL1); 589 aplls = cm_read_mod_reg(PLL_MOD, CM_CLKSEL1);
588 aplls &= OMAP24XX_APLLS_CLKIN_MASK; 590 aplls &= OMAP24XX_APLLS_CLKIN_MASK;
589 aplls >>= OMAP24XX_APLLS_CLKIN_SHIFT; 591 aplls >>= OMAP24XX_APLLS_CLKIN_SHIFT;
590 592
591 if (aplls == APLLS_CLKIN_19_2MHZ) 593 if (aplls == APLLS_CLKIN_19_2MHZ)
592 sclk = 19200000; 594 srate = 19200000;
593 else if (aplls == APLLS_CLKIN_13MHZ) 595 else if (aplls == APLLS_CLKIN_13MHZ)
594 sclk = 13000000; 596 srate = 13000000;
595 else if (aplls == APLLS_CLKIN_12MHZ) 597 else if (aplls == APLLS_CLKIN_12MHZ)
596 sclk = 12000000; 598 srate = 12000000;
597 599
598 return sclk; 600 return srate;
599} 601}
600 602
601static u32 omap2_get_sysclkdiv(void) 603static u32 omap2_get_sysclkdiv(void)