diff options
Diffstat (limited to 'arch/arm/plat-omap/dmtimer.c')
-rw-r--r-- | arch/arm/plat-omap/dmtimer.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index a38e8964c820..b4e6634380e5 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -661,6 +661,37 @@ int omap_dm_timer_set_int_enable(struct omap_dm_timer *timer, | |||
661 | } | 661 | } |
662 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_enable); | 662 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_enable); |
663 | 663 | ||
664 | /** | ||
665 | * omap_dm_timer_set_int_disable - disable timer interrupts | ||
666 | * @timer: pointer to timer handle | ||
667 | * @mask: bit mask of interrupts to be disabled | ||
668 | * | ||
669 | * Disables the specified timer interrupts for a timer. | ||
670 | */ | ||
671 | int omap_dm_timer_set_int_disable(struct omap_dm_timer *timer, u32 mask) | ||
672 | { | ||
673 | u32 l = mask; | ||
674 | |||
675 | if (unlikely(!timer)) | ||
676 | return -EINVAL; | ||
677 | |||
678 | omap_dm_timer_enable(timer); | ||
679 | |||
680 | if (timer->revision == 1) | ||
681 | l = __raw_readl(timer->irq_ena) & ~mask; | ||
682 | |||
683 | __raw_writel(l, timer->irq_dis); | ||
684 | l = omap_dm_timer_read_reg(timer, OMAP_TIMER_WAKEUP_EN_REG) & ~mask; | ||
685 | omap_dm_timer_write_reg(timer, OMAP_TIMER_WAKEUP_EN_REG, l); | ||
686 | |||
687 | /* Save the context */ | ||
688 | timer->context.tier &= ~mask; | ||
689 | timer->context.twer &= ~mask; | ||
690 | omap_dm_timer_disable(timer); | ||
691 | return 0; | ||
692 | } | ||
693 | EXPORT_SYMBOL_GPL(omap_dm_timer_set_int_disable); | ||
694 | |||
664 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer) | 695 | unsigned int omap_dm_timer_read_status(struct omap_dm_timer *timer) |
665 | { | 696 | { |
666 | unsigned int l; | 697 | unsigned int l; |