public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Make dyntick work again
@ 2007-10-11 20:32 Tony Lindgren
  2007-10-12  2:05 ` Kyungmin Park
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2007-10-11 20:32 UTC (permalink / raw)
  To: linux-omap-open-source

[-- Attachment #1: Type: text/plain, Size: 335 bytes --]

Hi all,

Here's a quick patch to make dyntick work on omap again
after the clocksource changes. It now uses the Linux 
common implementation instead of the ARM specific one.

I haven't tested this patch much yet, except:

# grep time /proc/interrupts; sleep 10; grep time /proc/interrupts

Drops the ticks to below 10.

Regards,

Tony

[-- Attachment #2: omap-32k-timer-oneshot.patch --]
[-- Type: text/x-diff, Size: 1251 bytes --]

diff --git a/arch/arm/plat-omap/timer32k.c b/arch/arm/plat-omap/timer32k.c
index be7cb8e..1eaec1c 100644
--- a/arch/arm/plat-omap/timer32k.c
+++ b/arch/arm/plat-omap/timer32k.c
@@ -146,6 +146,14 @@ static inline void omap_32k_timer_ack_irq(void)
 
 #endif
 
+static int omap_32k_timer_set_next_event(unsigned long delta,
+					 struct clock_event_device *dev)
+{
+	omap_32k_timer_start(delta);
+
+	return 0;
+}
+
 static void omap_32k_timer_set_mode(enum clock_event_mode mode,
 				    struct clock_event_device *evt)
 {
@@ -153,9 +161,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:
 	case CLOCK_EVT_MODE_UNUSED:
 	case CLOCK_EVT_MODE_SHUTDOWN:
 		break;
@@ -166,8 +174,9 @@ static void omap_32k_timer_set_mode(enum clock_event_mode mode,
 
 static struct clock_event_device clockevent_32k_timer = {
 	.name		= "32k-timer",
-	.features       = CLOCK_EVT_FEAT_PERIODIC,
+	.features       = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT,
 	.shift		= 32,
+	.set_next_event	= omap_32k_timer_set_next_event,
 	.set_mode	= omap_32k_timer_set_mode,
 };
 

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



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

end of thread, other threads:[~2007-10-12 20:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-11 20:32 [PATCH] Make dyntick work again Tony Lindgren
2007-10-12  2:05 ` Kyungmin Park
2007-10-12 14:47   ` Dirk Behme
2007-10-12 20:07     ` Tony Lindgren
2007-10-12 20:06   ` Tony Lindgren
2007-10-12 20:16     ` Woodruff, Richard
2007-10-12 20:22       ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox