RE: [PATCH 08/17] OMAP2/3: GPTIMER: Clear pending interrupts when entering suspend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 

>-----Original Message-----
>From: linux-omap-owner@xxxxxxxxxxxxxxx 
>[mailto:linux-omap-owner@xxxxxxxxxxxxxxx] On Behalf Of ext Kevin Hilman
>Sent: 20 October, 2009 20:37
>To: Kristo Tero (Nokia-D/Tampere)
>Cc: linux-omap@xxxxxxxxxxxxxxx
>Subject: Re: [PATCH 08/17] OMAP2/3: GPTIMER: Clear pending 
>interrupts when entering suspend
>
>Tero Kristo <tero.kristo@xxxxxxxxx> writes:
>
>> From: Tero Kristo <tero.kristo@xxxxxxxxx>
>>
>> OMAP GP timers keep running for a few cycles after they are stopped,
>> which can cause the timer to expire and generate an 
>interrupt. The pending
>> interrupt will prevent OMAP from entering suspend, thus we 
>ack it manually.
>>
>> Signed-off-by: Tero Kristo <tero.kristo@xxxxxxxxx>
>>
>> ---
>>  arch/arm/mach-omap2/timer-gp.c |   14 +++++++++++++-
>>  1 files changed, 13 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/timer-gp.c 
>b/arch/arm/mach-omap2/timer-gp.c
>> index 9c056ff..c9d47bb 100644
>> --- a/arch/arm/mach-omap2/timer-gp.c
>> +++ b/arch/arm/mach-omap2/timer-gp.c
>> @@ -92,9 +92,21 @@ static void omap2_gp_timer_set_mode(enum 
>clock_event_mode mode,
>>  	case CLOCK_EVT_MODE_ONESHOT:
>>  		break;
>>  	case CLOCK_EVT_MODE_UNUSED:
>> -	case CLOCK_EVT_MODE_SHUTDOWN:
>>  	case CLOCK_EVT_MODE_RESUME:
>>  		break;
>> +	case CLOCK_EVT_MODE_SHUTDOWN:
>> +		/*
>> +		 * Wait for min period x 2 to make sure that timer is
>> +		 * stopped
>> +		 */
>> +		udelay(evt->min_delta_ns / 500);
>> +		/*
>> +		 * Clear possibly pending interrupt, this will 
>occasionally
>> +		 * generate spurious timer IRQs during suspend but this
>> +		 * is okay, as another option is not to enter 
>suspend at all
>> +		 */
>> +		omap_dm_timer_write_status(gptimer, 
>OMAP_TIMER_INT_OVERFLOW);
>> +		break;
>
>Seems to me that this fix should just be done in omap_dm_timer_stop()
>since it could also result in extra interrupts in when using oneshot
>mode under dyntick.

Hmm yea, I can attempt to move this in there.

>
>Kevin
>
>--
>To unsubscribe from this list: send the line "unsubscribe 
>linux-omap" in
>the body of a message to majordomo@xxxxxxxxxxxxxxx
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux