From: Tony Lindgren Date: Tue, 20 May 2008 20:45:08 +0000 (-0700) Subject: ARM: OMAP: Remove calls for timer_dyn_reprogram() X-Git-Tag: v2.6.26-omap1~123^2~73 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0faf34c154a511cb419ea2e142293f950fcfe619;p=linux-2.6-omap-h63xx.git ARM: OMAP: Remove calls for timer_dyn_reprogram() These are not doing anything as CONFIG_NO_IDLE_HZ has been replaced with generic CONFIG_NO_HZ. Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index e6c64e10b7e..742f79e73bd 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c @@ -116,13 +116,6 @@ void omap_pm_idle(void) return; } - /* - * Since an interrupt may set up a timer, we don't want to - * reprogram the hardware timer with interrupts enabled. - * Re-enable interrupts only after returning from idle. - */ - timer_dyn_reprogram(); - #ifdef CONFIG_OMAP_MPU_TIMER #warning Enable 32kHz OS timer in order to allow sleep states in idle use_idlect1 = use_idlect1 & ~(1 << 9); diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c index 8636f1cf3d0..787a95e797f 100644 --- a/arch/arm/mach-omap2/pm24xx.c +++ b/arch/arm/mach-omap2/pm24xx.c @@ -244,35 +244,22 @@ static int omap2_can_sleep(void) return 1; } +/* + * Note that you can use clock_event_device->min_delta_ns if you want to + * avoid reprogramming timer too often when using CONFIG_NO_HZ. + */ static void omap2_pm_idle(void) { local_irq_disable(); local_fiq_disable(); if (!omap2_can_sleep()) { - /* timer_dyn_reprogram() takes about 100-200 us to complete. - * In some contexts (e.g. when waiting for a GPMC-SDRAM DMA - * transfer to complete), the increased latency is too much. - * - * omap2_block_sleep() and omap2_allow_sleep() can be used - * to indicate this. - */ - if (atomic_read(&sleep_block) == 0) { - timer_dyn_reprogram(); - if (omap_irq_pending()) - goto out; - } + if (!atomic_read(&sleep_block) && omap_irq_pending()) + goto out; omap2_enter_mpu_retention(); goto out; } - /* - * Since an interrupt may set up a timer, we don't want to - * reprogram the hardware timer with interrupts enabled. - * Re-enable interrupts only after returning from idle. - */ - timer_dyn_reprogram(); - if (omap_irq_pending()) goto out;