diff options
Diffstat (limited to 'arch/arm/mach-omap2/pm34xx.c')
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index c77f6db8a63d..4e87b61ca040 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -461,54 +461,12 @@ void omap_sram_idle(void) | |||
461 | omap2_clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]); | 461 | omap2_clkdm_allow_idle(mpu_pwrdm->pwrdm_clkdms[0]); |
462 | } | 462 | } |
463 | 463 | ||
464 | /* | ||
465 | * Check if functional clocks are enabled before entering | ||
466 | * sleep. This function could be behind CONFIG_PM_DEBUG | ||
467 | * when all drivers are configuring their sysconfig registers | ||
468 | * properly and using their clocks properly. | ||
469 | */ | ||
470 | static int omap3_fclks_active(void) | ||
471 | { | ||
472 | u32 fck_core1 = 0, fck_core3 = 0, fck_sgx = 0, fck_dss = 0, | ||
473 | fck_cam = 0, fck_per = 0, fck_usbhost = 0; | ||
474 | |||
475 | fck_core1 = cm_read_mod_reg(CORE_MOD, | ||
476 | CM_FCLKEN1); | ||
477 | if (omap_rev() > OMAP3430_REV_ES1_0) { | ||
478 | fck_core3 = cm_read_mod_reg(CORE_MOD, | ||
479 | OMAP3430ES2_CM_FCLKEN3); | ||
480 | fck_sgx = cm_read_mod_reg(OMAP3430ES2_SGX_MOD, | ||
481 | CM_FCLKEN); | ||
482 | fck_usbhost = cm_read_mod_reg(OMAP3430ES2_USBHOST_MOD, | ||
483 | CM_FCLKEN); | ||
484 | } else | ||
485 | fck_sgx = cm_read_mod_reg(GFX_MOD, | ||
486 | OMAP3430ES2_CM_FCLKEN3); | ||
487 | fck_dss = cm_read_mod_reg(OMAP3430_DSS_MOD, | ||
488 | CM_FCLKEN); | ||
489 | fck_cam = cm_read_mod_reg(OMAP3430_CAM_MOD, | ||
490 | CM_FCLKEN); | ||
491 | fck_per = cm_read_mod_reg(OMAP3430_PER_MOD, | ||
492 | CM_FCLKEN); | ||
493 | |||
494 | /* Ignore UART clocks. These are handled by UART core (serial.c) */ | ||
495 | fck_core1 &= ~(OMAP3430_EN_UART1 | OMAP3430_EN_UART2); | ||
496 | fck_per &= ~OMAP3430_EN_UART3; | ||
497 | |||
498 | if (fck_core1 | fck_core3 | fck_sgx | fck_dss | | ||
499 | fck_cam | fck_per | fck_usbhost) | ||
500 | return 1; | ||
501 | return 0; | ||
502 | } | ||
503 | |||
504 | int omap3_can_sleep(void) | 464 | int omap3_can_sleep(void) |
505 | { | 465 | { |
506 | if (!sleep_while_idle) | 466 | if (!sleep_while_idle) |
507 | return 0; | 467 | return 0; |
508 | if (!omap_uart_can_sleep()) | 468 | if (!omap_uart_can_sleep()) |
509 | return 0; | 469 | return 0; |
510 | if (omap3_fclks_active()) | ||
511 | return 0; | ||
512 | return 1; | 470 | return 1; |
513 | } | 471 | } |
514 | 472 | ||