Re: [PATCH 12/14] ARM: OMAP1: Timer32K: Fix timer32K for clockevents and clean it up

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

 



On Thu, 20 Mar 2008, Kevin Hilman wrote:

> Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> 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 <tony@xxxxxxxxxxx>
> >> ---
> >>  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.

Yup. Oneshot mode is programmed from the clockevents framework.

Thanks,
	tglx
 
> 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 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