aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index cbc2a8a4ce3..3800084a1e7 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -387,8 +387,6 @@ static int _set_module_autoidle(struct omap_hwmod *oh, u8 autoidle,
387 */ 387 */
388static int _enable_wakeup(struct omap_hwmod *oh, u32 *v) 388static int _enable_wakeup(struct omap_hwmod *oh, u32 *v)
389{ 389{
390 u32 wakeup_mask;
391
392 if (!oh->class->sysc || 390 if (!oh->class->sysc ||
393 !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) || 391 !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) ||
394 (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) || 392 (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) ||
@@ -400,9 +398,8 @@ static int _enable_wakeup(struct omap_hwmod *oh, u32 *v)
400 return -EINVAL; 398 return -EINVAL;
401 } 399 }
402 400
403 wakeup_mask = (0x1 << oh->class->sysc->sysc_fields->enwkup_shift); 401 if (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)
404 402 *v |= 0x1 << oh->class->sysc->sysc_fields->enwkup_shift;
405 *v |= wakeup_mask;
406 403
407 if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) 404 if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)
408 _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART_WKUP, v); 405 _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART_WKUP, v);
@@ -425,8 +422,6 @@ static int _enable_wakeup(struct omap_hwmod *oh, u32 *v)
425 */ 422 */
426static int _disable_wakeup(struct omap_hwmod *oh, u32 *v) 423static int _disable_wakeup(struct omap_hwmod *oh, u32 *v)
427{ 424{
428 u32 wakeup_mask;
429
430 if (!oh->class->sysc || 425 if (!oh->class->sysc ||
431 !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) || 426 !((oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP) ||
432 (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) || 427 (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) ||
@@ -438,9 +433,8 @@ static int _disable_wakeup(struct omap_hwmod *oh, u32 *v)
438 return -EINVAL; 433 return -EINVAL;
439 } 434 }
440 435
441 wakeup_mask = (0x1 << oh->class->sysc->sysc_fields->enwkup_shift); 436 if (oh->class->sysc->sysc_flags & SYSC_HAS_ENAWAKEUP)
442 437 *v &= ~(0x1 << oh->class->sysc->sysc_fields->enwkup_shift);
443 *v &= ~wakeup_mask;
444 438
445 if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP) 439 if (oh->class->sysc->idlemodes & SIDLE_SMART_WKUP)
446 _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART, v); 440 _set_slave_idlemode(oh, HWMOD_IDLEMODE_SMART, v);