Russell King - ARM Linux <[EMAIL PROTECTED]> writes:

> On Mon, Mar 17, 2008 at 11:42:36AM +0200, Tony Lindgren wrote:
>> This patch fixes timer32k for clockevents and syncs it with
>> linux-omap tree.
>> 
>> Signed-off-by: Tony Lindgren <[EMAIL PROTECTED]>
>> ---
>>  arch/arm/mach-omap1/timer32k.c |   20 ++++++++++++++------
>>  1 files changed, 14 insertions(+), 6 deletions(-)
>> 
>>...
>> @@ -126,9 +131,9 @@ static void omap_32k_timer_set_mode(enum 
>> clock_event_mode mode,
>>  
>>      switch (mode) {
>>      case CLOCK_EVT_MODE_PERIODIC:
>> +    case CLOCK_EVT_MODE_ONESHOT:
>>              omap_32k_timer_start(OMAP_32K_TIMER_TICK_PERIOD);
>>              break;
>> -    case CLOCK_EVT_MODE_ONESHOT:
>
> I didn't think an event was supposed to be programmed to fire when one
> shot mode is selected - from the other implementations, it appears that
> the timer should be disabled until set_next_event() has been called.

That is correct.  The 'start' should only be happening for the
periodic mode.  This following change should be done.

Kevin


diff --git a/arch/arm/mach-omap1/timer32k.c b/arch/arm/mach-omap1/timer32k.c
index 905e735..0d9b02e 100644
--- a/arch/arm/mach-omap1/timer32k.c
+++ b/arch/arm/mach-omap1/timer32k.c
@@ -131,9 +131,8 @@ static void omap_32k_timer_set_mode(enum clock_event_mode 
mode,
 
        switch (mode) {
        case CLOCK_EVT_MODE_PERIODIC:
-       case CLOCK_EVT_MODE_ONESHOT:
                omap_32k_timer_start(OMAP_32K_TIMER_TICK_PERIOD);
-               break;
+       case CLOCK_EVT_MODE_ONESHOT:
        case CLOCK_EVT_MODE_UNUSED:
        case CLOCK_EVT_MODE_SHUTDOWN:
                break;
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to