All of lore.kernel.org
 help / color / mirror / Atom feed
* interval of TMU
@ 2008-07-18 10:40 Hideo Saito
  2008-07-18 21:52 ` Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: Hideo Saito @ 2008-07-18 10:40 UTC (permalink / raw)
  To: linux-sh

Hi Paul,

It seems that TCOR register is set by current value of TCNT register, when tmu_set_mode() is called after the clock starts in tmu_timer_init(). Is this right?

I think that CLOCK_EVT_MODE_PERIODIC is to initialize the timer, not to change interval.

--- ./arch/sh/kernel/timers/timer-tmu.c.org	2008-04-17 11:49:44.000000000 +0900
+++ ./arch/sh/kernel/timers/timer-tmu.c	2008-07-18 18:51:22.000000000 +0900
@@ -68,17 +68,17 @@ static int tmu_set_next_event(unsigned l
 	return 0;
 }
 
 static void tmu_set_mode(enum clock_event_mode mode,
 			 struct clock_event_device *evt)
 {
 	switch (mode) {
 	case CLOCK_EVT_MODE_PERIODIC:
-		ctrl_outl(ctrl_inl(TMU0_TCNT), TMU0_TCOR);
+		ctrl_outl(ctrl_inl(TMU0_TCOR), TMU0_TCNT);
 		break;
 	case CLOCK_EVT_MODE_ONESHOT:
 		ctrl_outl(0, TMU0_TCOR);
 		break;
 	case CLOCK_EVT_MODE_UNUSED:
 	case CLOCK_EVT_MODE_SHUTDOWN:
 	case CLOCK_EVT_MODE_RESUME:
 		break;

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-07-18 21:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-18 10:40 interval of TMU Hideo Saito
2008-07-18 21:52 ` Paul Mundt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.