diff options
Diffstat (limited to 'arch/arm/mach-omap2/cminst44xx.c')
-rw-r--r-- | arch/arm/mach-omap2/cminst44xx.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/cminst44xx.c b/arch/arm/mach-omap2/cminst44xx.c index 731ca134348c..f5c4731b6f06 100644 --- a/arch/arm/mach-omap2/cminst44xx.c +++ b/arch/arm/mach-omap2/cminst44xx.c | |||
@@ -254,6 +254,11 @@ void omap4_cminst_clkdm_force_wakeup(u8 part, u16 inst, u16 cdoffs) | |||
254 | * | 254 | * |
255 | */ | 255 | */ |
256 | 256 | ||
257 | void omap4_cminst_clkdm_force_sleep(u8 part, u16 inst, u16 cdoffs) | ||
258 | { | ||
259 | _clktrctrl_write(OMAP34XX_CLKSTCTRL_FORCE_SLEEP, part, inst, cdoffs); | ||
260 | } | ||
261 | |||
257 | /** | 262 | /** |
258 | * omap4_cminst_wait_module_ready - wait for a module to be in 'func' state | 263 | * omap4_cminst_wait_module_ready - wait for a module to be in 'func' state |
259 | * @part: PRCM partition ID that the CM_CLKCTRL register exists in | 264 | * @part: PRCM partition ID that the CM_CLKCTRL register exists in |
@@ -404,8 +409,17 @@ static int omap4_clkdm_clear_all_wkup_sleep_deps(struct clockdomain *clkdm) | |||
404 | 409 | ||
405 | static int omap4_clkdm_sleep(struct clockdomain *clkdm) | 410 | static int omap4_clkdm_sleep(struct clockdomain *clkdm) |
406 | { | 411 | { |
407 | omap4_cminst_clkdm_enable_hwsup(clkdm->prcm_partition, | 412 | if (clkdm->flags & CLKDM_CAN_HWSUP) |
408 | clkdm->cm_inst, clkdm->clkdm_offs); | 413 | omap4_cminst_clkdm_enable_hwsup(clkdm->prcm_partition, |
414 | clkdm->cm_inst, | ||
415 | clkdm->clkdm_offs); | ||
416 | else if (clkdm->flags & CLKDM_CAN_FORCE_SLEEP) | ||
417 | omap4_cminst_clkdm_force_sleep(clkdm->prcm_partition, | ||
418 | clkdm->cm_inst, | ||
419 | clkdm->clkdm_offs); | ||
420 | else | ||
421 | return -EINVAL; | ||
422 | |||
409 | return 0; | 423 | return 0; |
410 | } | 424 | } |
411 | 425 | ||