diff options
author | Tony Lindgren <tony@atomide.com> | 2011-03-11 12:20:03 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-03-11 12:20:03 -0500 |
commit | a2358a7bc35e388978fc2f7f6b071a0fd27d78c1 (patch) | |
tree | fbdc2ddb066243a11aebc490c4d54e6a42be51e2 /arch/arm/mach-omap2/pm24xx.c | |
parent | 94a06b74e724caabcf0464c81527cfbcae0c8aff (diff) | |
parent | a08572ae529b1e8de12393eeced661feae8fd44c (diff) |
Merge branch 'integration-2.6.39-for-tony' of git://git.pwsan.com/linux-integration into omap-for-linus
Conflicts:
arch/arm/mach-omap2/pm34xx.c
Diffstat (limited to 'arch/arm/mach-omap2/pm24xx.c')
-rw-r--r-- | arch/arm/mach-omap2/pm24xx.c | 77 |
1 files changed, 8 insertions, 69 deletions
diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index 10f8747ba572..df3ded6fe194 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c | |||
@@ -364,10 +364,10 @@ static const struct platform_suspend_ops __initdata omap_pm_ops; | |||
364 | static int __init clkdms_setup(struct clockdomain *clkdm, void *unused) | 364 | static int __init clkdms_setup(struct clockdomain *clkdm, void *unused) |
365 | { | 365 | { |
366 | if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO) | 366 | if (clkdm->flags & CLKDM_CAN_ENABLE_AUTO) |
367 | omap2_clkdm_allow_idle(clkdm); | 367 | clkdm_allow_idle(clkdm); |
368 | else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP && | 368 | else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP && |
369 | atomic_read(&clkdm->usecount) == 0) | 369 | atomic_read(&clkdm->usecount) == 0) |
370 | omap2_clkdm_sleep(clkdm); | 370 | clkdm_sleep(clkdm); |
371 | return 0; | 371 | return 0; |
372 | } | 372 | } |
373 | 373 | ||
@@ -376,7 +376,10 @@ static void __init prcm_setup_regs(void) | |||
376 | int i, num_mem_banks; | 376 | int i, num_mem_banks; |
377 | struct powerdomain *pwrdm; | 377 | struct powerdomain *pwrdm; |
378 | 378 | ||
379 | /* Enable autoidle */ | 379 | /* |
380 | * Enable autoidle | ||
381 | * XXX This should be handled by hwmod code or PRCM init code | ||
382 | */ | ||
380 | omap2_prm_write_mod_reg(OMAP24XX_AUTOIDLE_MASK, OCP_MOD, | 383 | omap2_prm_write_mod_reg(OMAP24XX_AUTOIDLE_MASK, OCP_MOD, |
381 | OMAP2_PRCM_SYSCONFIG_OFFSET); | 384 | OMAP2_PRCM_SYSCONFIG_OFFSET); |
382 | 385 | ||
@@ -402,80 +405,16 @@ static void __init prcm_setup_regs(void) | |||
402 | 405 | ||
403 | pwrdm = clkdm_get_pwrdm(dsp_clkdm); | 406 | pwrdm = clkdm_get_pwrdm(dsp_clkdm); |
404 | pwrdm_set_next_pwrst(pwrdm, PWRDM_POWER_OFF); | 407 | pwrdm_set_next_pwrst(pwrdm, PWRDM_POWER_OFF); |
405 | omap2_clkdm_sleep(dsp_clkdm); | 408 | clkdm_sleep(dsp_clkdm); |
406 | 409 | ||
407 | pwrdm = clkdm_get_pwrdm(gfx_clkdm); | 410 | pwrdm = clkdm_get_pwrdm(gfx_clkdm); |
408 | pwrdm_set_next_pwrst(pwrdm, PWRDM_POWER_OFF); | 411 | pwrdm_set_next_pwrst(pwrdm, PWRDM_POWER_OFF); |
409 | omap2_clkdm_sleep(gfx_clkdm); | 412 | clkdm_sleep(gfx_clkdm); |
410 | 413 | ||
411 | /* Enable hardware-supervised idle for all clkdms */ | 414 | /* Enable hardware-supervised idle for all clkdms */ |
412 | clkdm_for_each(clkdms_setup, NULL); | 415 | clkdm_for_each(clkdms_setup, NULL); |
413 | clkdm_add_wkdep(mpu_clkdm, wkup_clkdm); | 416 | clkdm_add_wkdep(mpu_clkdm, wkup_clkdm); |
414 | 417 | ||
415 | /* Enable clock autoidle for all domains */ | ||
416 | omap2_cm_write_mod_reg(OMAP24XX_AUTO_CAM_MASK | | ||
417 | OMAP24XX_AUTO_MAILBOXES_MASK | | ||
418 | OMAP24XX_AUTO_WDT4_MASK | | ||
419 | OMAP2420_AUTO_WDT3_MASK | | ||
420 | OMAP24XX_AUTO_MSPRO_MASK | | ||
421 | OMAP2420_AUTO_MMC_MASK | | ||
422 | OMAP24XX_AUTO_FAC_MASK | | ||
423 | OMAP2420_AUTO_EAC_MASK | | ||
424 | OMAP24XX_AUTO_HDQ_MASK | | ||
425 | OMAP24XX_AUTO_UART2_MASK | | ||
426 | OMAP24XX_AUTO_UART1_MASK | | ||
427 | OMAP24XX_AUTO_I2C2_MASK | | ||
428 | OMAP24XX_AUTO_I2C1_MASK | | ||
429 | OMAP24XX_AUTO_MCSPI2_MASK | | ||
430 | OMAP24XX_AUTO_MCSPI1_MASK | | ||
431 | OMAP24XX_AUTO_MCBSP2_MASK | | ||
432 | OMAP24XX_AUTO_MCBSP1_MASK | | ||
433 | OMAP24XX_AUTO_GPT12_MASK | | ||
434 | OMAP24XX_AUTO_GPT11_MASK | | ||
435 | OMAP24XX_AUTO_GPT10_MASK | | ||
436 | OMAP24XX_AUTO_GPT9_MASK | | ||
437 | OMAP24XX_AUTO_GPT8_MASK | | ||
438 | OMAP24XX_AUTO_GPT7_MASK | | ||
439 | OMAP24XX_AUTO_GPT6_MASK | | ||
440 | OMAP24XX_AUTO_GPT5_MASK | | ||
441 | OMAP24XX_AUTO_GPT4_MASK | | ||
442 | OMAP24XX_AUTO_GPT3_MASK | | ||
443 | OMAP24XX_AUTO_GPT2_MASK | | ||
444 | OMAP2420_AUTO_VLYNQ_MASK | | ||
445 | OMAP24XX_AUTO_DSS_MASK, | ||
446 | CORE_MOD, CM_AUTOIDLE1); | ||
447 | omap2_cm_write_mod_reg(OMAP24XX_AUTO_UART3_MASK | | ||
448 | OMAP24XX_AUTO_SSI_MASK | | ||
449 | OMAP24XX_AUTO_USB_MASK, | ||
450 | CORE_MOD, CM_AUTOIDLE2); | ||
451 | omap2_cm_write_mod_reg(OMAP24XX_AUTO_SDRC_MASK | | ||
452 | OMAP24XX_AUTO_GPMC_MASK | | ||
453 | OMAP24XX_AUTO_SDMA_MASK, | ||
454 | CORE_MOD, CM_AUTOIDLE3); | ||
455 | omap2_cm_write_mod_reg(OMAP24XX_AUTO_PKA_MASK | | ||
456 | OMAP24XX_AUTO_AES_MASK | | ||
457 | OMAP24XX_AUTO_RNG_MASK | | ||
458 | OMAP24XX_AUTO_SHA_MASK | | ||
459 | OMAP24XX_AUTO_DES_MASK, | ||
460 | CORE_MOD, OMAP24XX_CM_AUTOIDLE4); | ||
461 | |||
462 | omap2_cm_write_mod_reg(OMAP2420_AUTO_DSP_IPI_MASK, OMAP24XX_DSP_MOD, | ||
463 | CM_AUTOIDLE); | ||
464 | |||
465 | /* Put DPLL and both APLLs into autoidle mode */ | ||
466 | omap2_cm_write_mod_reg((0x03 << OMAP24XX_AUTO_DPLL_SHIFT) | | ||
467 | (0x03 << OMAP24XX_AUTO_96M_SHIFT) | | ||
468 | (0x03 << OMAP24XX_AUTO_54M_SHIFT), | ||
469 | PLL_MOD, CM_AUTOIDLE); | ||
470 | |||
471 | omap2_cm_write_mod_reg(OMAP24XX_AUTO_OMAPCTRL_MASK | | ||
472 | OMAP24XX_AUTO_WDT1_MASK | | ||
473 | OMAP24XX_AUTO_MPU_WDT_MASK | | ||
474 | OMAP24XX_AUTO_GPIOS_MASK | | ||
475 | OMAP24XX_AUTO_32KSYNC_MASK | | ||
476 | OMAP24XX_AUTO_GPT1_MASK, | ||
477 | WKUP_MOD, CM_AUTOIDLE); | ||
478 | |||
479 | /* REVISIT: Configure number of 32 kHz clock cycles for sys_clk | 418 | /* REVISIT: Configure number of 32 kHz clock cycles for sys_clk |
480 | * stabilisation */ | 419 | * stabilisation */ |
481 | omap2_prm_write_mod_reg(15 << OMAP_SETUP_TIME_SHIFT, OMAP24XX_GR_MOD, | 420 | omap2_prm_write_mod_reg(15 << OMAP_SETUP_TIME_SHIFT, OMAP24XX_GR_MOD, |