[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>
This commit is contained in:
committed by
Russell King
parent
b824efae12
commit
a569c6ec37
@ -97,6 +97,32 @@ int omap_dm_timers_active(void)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* omap_dm_timer_modify_idlect_mask - Check if any running timers use ARMXOR
|
||||
* @inputmask: current value of idlect mask
|
||||
*/
|
||||
__u32 omap_dm_timer_modify_idlect_mask(__u32 inputmask)
|
||||
{
|
||||
int n;
|
||||
|
||||
/* If ARMXOR cannot be idled this function call is unnecessary */
|
||||
if (!(inputmask & (1 << 1)))
|
||||
return inputmask;
|
||||
|
||||
/* If any active timer is using ARMXOR return modified mask */
|
||||
for (n = 0; dm_timers[n].base; ++n)
|
||||
if (omap_dm_timer_read_reg(&dm_timers[n], OMAP_TIMER_CTRL_REG)&
|
||||
OMAP_TIMER_CTRL_ST) {
|
||||
if (((omap_readl(MOD_CONF_CTRL_1)>>(n*2)) & 0x03) == 0)
|
||||
inputmask &= ~(1 << 1);
|
||||
else
|
||||
inputmask &= ~(1 << 2);
|
||||
}
|
||||
|
||||
return inputmask;
|
||||
}
|
||||
|
||||
|
||||
void omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
|
||||
{
|
||||
int n = (timer - dm_timers) << 1;
|
||||
|
Reference in New Issue
Block a user