All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: linux-omap-open-source@linux.omap.com
Subject: [PATCH] Make dyntick work again
Date: Thu, 11 Oct 2007 13:32:41 -0700	[thread overview]
Message-ID: <20071011203240.GL503@atomide.com> (raw)

[-- 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 --]



             reply	other threads:[~2007-10-11 20:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-11 20:32 Tony Lindgren [this message]
2007-10-12  2:05 ` [PATCH] Make dyntick work again 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071011203240.GL503@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-omap-open-source@linux.omap.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.