diff options
author | Tony Lindgren <tony@atomide.com> | 2006-04-02 12:46:21 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-04-02 12:46:21 -0400 |
commit | a569c6ec37e78eef4299d0a60ae4028459b27117 (patch) | |
tree | 6f51fde75ecd91661e1fc3268cdea47c47f4dd74 /arch/arm/plat-omap/dmtimer.c | |
parent | b824efae120b656fef562b2e81e1ed6aa88f8d24 (diff) |
[ARM] 3427/1: ARM: OMAP: 2/8 Update timers
Patch from Tony Lindgren
Update OMAP timers from linux-omap tree. The highlights of the
patch are:
- Move timer32k code from mach-omap1 to plat-omap and make it
work also on omap24xx by Tony Lindgren
- Add support for dmtimer idle check for PM by Tuukka Tikkanen
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/plat-omap/dmtimer.c')
-rw-r--r-- | arch/arm/plat-omap/dmtimer.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index 38d7ebf87920..eba3cb52ad87 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -97,6 +97,32 @@ int omap_dm_timers_active(void) | |||
97 | } | 97 | } |
98 | 98 | ||
99 | 99 | ||
100 | /** | ||
101 | * omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR | ||
102 | * @inputmask: current value of idlect mask | ||
103 | */ | ||
104 | __u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask) | ||
105 | { | ||
106 | int n; | ||
107 | |||
108 | /* If ARMXOR cannot be idled this function call is unnecessary */ | ||
109 | if (!(inputmask & (1 << 1))) | ||
110 | return inputmask; | ||
111 | |||
112 | /* If any active timer is using ARMXOR return modified mask */ | ||
113 | for (n = 0; dm_timers[n].base; ++n) | ||
114 | if (omap_dm_timer_read_reg(&dm_timers[n], OMAP_TIMER_CTRL_REG)& | ||
115 | OMAP_TIMER_CTRL_ST) { | ||
116 | if (((omap_readl(MOD_CONF_CTRL_1)>>(n*2)) & 0x03) == 0) | ||
117 | inputmask &= ~(1 << 1); | ||
118 | else | ||
119 | inputmask &= ~(1 << 2); | ||
120 | } | ||
121 | |||
122 | return inputmask; | ||
123 | } | ||
124 | |||
125 | |||
100 | void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) | 126 | void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source) |
101 | { | 127 | { |
102 | int n = (timer - dm_timers) << 1; | 128 | int n = (timer - dm_timers) << 1; |