From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.arm.linux.org.uk
Cc: Kevin Hilman <khilman@deeprootsystems.com>,
Paul Walmsley <paul@pwsan.com>,
linux-omap@vger.kernel.org, Richard Woodruff <r-woodruff2@ti.com>
Subject: [PATCH 6/6] ARM: OMAP2: skip unnecessary TLDR write during non-autoreload for gptimer
Date: Thu, 04 Dec 2008 18:41:53 -0800 [thread overview]
Message-ID: <20081205024153.3868.52653.stgit@localhost> (raw)
In-Reply-To: <20081205023737.3868.78857.stgit@localhost>
From: Paul Walmsley <paul@pwsan.com>
The GPTIMER TLDR register does not need to be written if the GPTIMER
is not in autoreload mode. This is the usual case for dynamic tick-enabled
kernels.
Simulation data indicate that skipping the read that occurs as part of
the write should save at least 300-320 ns for each GPTIMER1 timer
reprogram. (This assumes L4-Wakeup is at 19MHz and GPTIMER write
posting is enabled.) Skipping the write itself probably won't have
much impact since it should be posted on the OCP interconnect.
Tested on 2430SDP and 3430SDP.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Richard Woodruff <r-woodruff2@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/plat-omap/dmtimer.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c
index 595e3d5..e4f0ce0 100644
--- a/arch/arm/plat-omap/dmtimer.c
+++ b/arch/arm/plat-omap/dmtimer.c
@@ -549,14 +549,15 @@ void omap_dm_timer_set_load_start(struct omap_dm_timer *timer, int autoreload,
u32 l;
l = omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
- if (autoreload)
+ if (autoreload) {
l |= OMAP_TIMER_CTRL_AR;
- else
+ omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load);
+ } else {
l &= ~OMAP_TIMER_CTRL_AR;
+ }
l |= OMAP_TIMER_CTRL_ST;
omap_dm_timer_write_reg(timer, OMAP_TIMER_COUNTER_REG, load);
- omap_dm_timer_write_reg(timer, OMAP_TIMER_LOAD_REG, load);
omap_dm_timer_write_reg(timer, OMAP_TIMER_CTRL_REG, l);
}
prev parent reply other threads:[~2008-12-05 2:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-05 2:38 [PATCH 0/6] Omap2 updates for 2.6.29 merge window Tony Lindgren
2008-12-05 2:39 ` [PATCH 1/6] ARM: OMAP2: Prepare cpu detection for further improvements Tony Lindgren
2008-12-05 2:39 ` [PATCH 2/6] ARM: OMAP2: Fix cpu detection Tony Lindgren
2008-12-05 2:40 ` [PATCH 3/6] ARM: OMAP2: Use omap_rev() instead of system_rev Tony Lindgren
2008-12-05 2:40 ` [PATCH 4/6] ARM: OMAP2: bard-h4: list those eeproms Tony Lindgren
2008-12-05 2:41 ` [PATCH 5/6] ARM: OMAP2: drop redundant pending write check for gptimer Tony Lindgren
2008-12-07 11:25 ` Russell King - ARM Linux
2008-12-07 14:55 ` Woodruff, Richard
2008-12-07 17:06 ` Russell King - ARM Linux
2008-12-07 20:54 ` Tony Lindgren
2008-12-11 22:14 ` Paul Walmsley
2008-12-05 2:41 ` Tony Lindgren [this message]
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=20081205024153.3868.52653.stgit@localhost \
--to=tony@atomide.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-omap@vger.kernel.org \
--cc=paul@pwsan.com \
--cc=r-woodruff2@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox