aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/pm24xx.c
diff options
context:
space:
mode:
authorPaul Walmsley <paul@pwsan.com>2011-02-25 17:49:53 -0500
committerPaul Walmsley <paul@pwsan.com>2011-03-07 22:02:05 -0500
commit0fd0c21be71293d8a54d9075b18b5a25a1868057 (patch)
treeebf500cb2d7b0c104fc1e1c190aa3b2457d987c8 /arch/arm/mach-omap2/pm24xx.c
parentc6461f5c5970833cf28c5096cdfc7a095eb3bbb5 (diff)
OMAP2: clock: add DPLL autoidle support
Add the necessary code and data to allow the clock framework to enable and disable the OMAP2 DPLL autoidle state. This is so the direct register access can be moved out of the mach-omap2/pm24xx.c code, and other code that needs to control this (e.g., CPUIdle) can do so via an API. As part of this patch, remove the pm24xx.c code that formerly wrote directly to the autoidle bits. Signed-off-by: Paul Walmsley <paul@pwsan.com> Cc: Kevin Hilman <khilman@ti.com> Tested-by: Rajendra Nayak <rnayak@ti.com> Reviewed-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm24xx.c')
-rw-r--r--arch/arm/mach-omap2/pm24xx.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index e983c8301f55..297bb21061b8 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -378,6 +378,7 @@ static void __init prcm_setup_regs(void)
378{ 378{
379 int i, num_mem_banks; 379 int i, num_mem_banks;
380 struct powerdomain *pwrdm; 380 struct powerdomain *pwrdm;
381 u32 v;
381 382
382 /* Enable autoidle */ 383 /* Enable autoidle */
383 omap2_prm_write_mod_reg(OMAP24XX_AUTOIDLE_MASK, OCP_MOD, 384 omap2_prm_write_mod_reg(OMAP24XX_AUTOIDLE_MASK, OCP_MOD,
@@ -468,11 +469,12 @@ static void __init prcm_setup_regs(void)
468 omap2_cm_write_mod_reg(OMAP2420_AUTO_DSP_IPI_MASK, OMAP24XX_DSP_MOD, 469 omap2_cm_write_mod_reg(OMAP2420_AUTO_DSP_IPI_MASK, OMAP24XX_DSP_MOD,
469 CM_AUTOIDLE); 470 CM_AUTOIDLE);
470 471
471 /* Put DPLL and both APLLs into autoidle mode */ 472 /* Put both APLLs into autoidle mode */
472 omap2_cm_write_mod_reg((0x03 << OMAP24XX_AUTO_DPLL_SHIFT) | 473 v = omap2_cm_read_mod_reg(PLL_MOD, CM_AUTOIDLE);
473 (0x03 << OMAP24XX_AUTO_96M_SHIFT) | 474 v &= ~(OMAP24XX_AUTO_96M_MASK | OMAP24XX_AUTO_54M_SHIFT);
474 (0x03 << OMAP24XX_AUTO_54M_SHIFT), 475 v |= (0x03 << OMAP24XX_AUTO_96M_SHIFT) |
475 PLL_MOD, CM_AUTOIDLE); 476 (0x03 << OMAP24XX_AUTO_54M_SHIFT);
477 omap2_cm_write_mod_reg(v, PLL_MOD, CM_AUTOIDLE);
476 478
477 omap2_cm_write_mod_reg(OMAP24XX_AUTO_OMAPCTRL_MASK | 479 omap2_cm_write_mod_reg(OMAP24XX_AUTO_OMAPCTRL_MASK |
478 OMAP24XX_AUTO_WDT1_MASK | 480 OMAP24XX_AUTO_WDT1_MASK |