From: Tony Lindgren <tony@atomide.com>
To: linux-arm-kernel@lists.arm.linux.org.uk
Cc: linux-omap@vger.kernel.org, Kevin Hilman <khilman@mvista.com>,
Tony Lindgren <tony@atomide.com>
Subject: [PATCH 13/14] ARM: OMAP: TimerMPU: Remove unused cycles-to-nsec conversions
Date: Mon, 17 Mar 2008 11:42:37 +0200 [thread overview]
Message-ID: <1205746958-11242-14-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <1205746958-11242-13-git-send-email-tony@atomide.com>
From: Kevin Hilman <khilman@mvista.com>
These are no longer used and similar conversions are provided
by the clocksource/clockevent code.
Signed-off-by: Kevin Hilman <khilman@mvista.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
arch/arm/mach-omap1/time.c | 33 ---------------------------------
1 files changed, 0 insertions(+), 33 deletions(-)
diff --git a/arch/arm/mach-omap1/time.c b/arch/arm/mach-omap1/time.c
index a4f8b20..f6cf2b7 100644
--- a/arch/arm/mach-omap1/time.c
+++ b/arch/arm/mach-omap1/time.c
@@ -56,37 +56,6 @@
#define OMAP_MPU_TIMER_BASE OMAP_MPU_TIMER1_BASE
#define OMAP_MPU_TIMER_OFFSET 0x100
-/* cycles to nsec conversions taken from arch/i386/kernel/timers/timer_tsc.c,
- * converted to use kHz by Kevin Hilman */
-/* convert from cycles(64bits) => nanoseconds (64bits)
- * basic equation:
- * ns = cycles / (freq / ns_per_sec)
- * ns = cycles * (ns_per_sec / freq)
- * ns = cycles * (10^9 / (cpu_khz * 10^3))
- * ns = cycles * (10^6 / cpu_khz)
- *
- * Then we use scaling math (suggested by george at mvista.com) to get:
- * ns = cycles * (10^6 * SC / cpu_khz / SC
- * ns = cycles * cyc2ns_scale / SC
- *
- * And since SC is a constant power of two, we can convert the div
- * into a shift.
- * -johnstul at us.ibm.com "math is hard, lets go shopping!"
- */
-static unsigned long cyc2ns_scale;
-#define CYC2NS_SCALE_FACTOR 10 /* 2^10, carefully chosen */
-
-static inline void set_cyc2ns_scale(unsigned long cpu_khz)
-{
- cyc2ns_scale = (1000000 << CYC2NS_SCALE_FACTOR)/cpu_khz;
-}
-
-static inline unsigned long long cycles_2_ns(unsigned long long cyc)
-{
- return (cyc * cyc2ns_scale) >> CYC2NS_SCALE_FACTOR;
-}
-
-
typedef struct {
u32 cntl; /* CNTL_TIMER, R/W */
u32 load_tim; /* LOAD_TIM, W */
@@ -194,8 +163,6 @@ static struct irqaction omap_mpu_timer1_irq = {
static __init void omap_init_mpu_timer(unsigned long rate)
{
- set_cyc2ns_scale(rate / 1000);
-
setup_irq(INT_TIMER1, &omap_mpu_timer1_irq);
omap_mpu_timer_start(0, (rate / HZ) - 1, 1);
--
1.5.3.6
next prev parent reply other threads:[~2008-03-17 9:43 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-17 9:42 [PATCH 0/14] Omap patches for post 2.6.25 Tony Lindgren
2008-03-17 9:42 ` [PATCH 1/14] ARM: OMAP: Use gpiolib Tony Lindgren
2008-03-17 9:42 ` [PATCH 2/14] ARM: OMAP: 5912 OSK GPIO updates Tony Lindgren
2008-03-17 9:42 ` [PATCH 3/14] ARM: OMAP: I2C: tps65010 driver converts to gpiolib Tony Lindgren
2008-03-17 9:42 ` [PATCH 4/14] ARM: OMAP: Use gpiolib with tps65010 for OSK 5912 Tony Lindgren
2008-03-17 9:42 ` [PATCH 5/14] ARM: OMAP: Clear level-triggered GPIO interrupts in unmask hook Tony Lindgren
2008-03-17 9:42 ` [PATCH 6/14] ARM: OMAP: use edge/level handlers from generic IRQ framework Tony Lindgren
2008-03-17 9:42 ` [PATCH 7/14] ARM: OMAP: Allow registering pin mux function Tony Lindgren
2008-03-17 9:42 ` [PATCH 8/14] ARM: OMAP: Split omap_cfg_reg() into omap processor specific functions Tony Lindgren
2008-03-17 9:42 ` [PATCH 9/14] ARM: OMAP: Timer32K: Re-organize duplicated 32k-timer code Tony Lindgren
2008-03-17 9:42 ` [PATCH 10/14] ARM: OMAP: Timer32K: Move 32k-based sched_clock() to common code Tony Lindgren
2008-03-17 9:42 ` [PATCH 11/14] ARM: OMAP: Timer32K: Move timer32k to mach-omap1 Tony Lindgren
2008-03-17 9:42 ` [PATCH 12/14] ARM: OMAP1: Timer32K: Fix timer32K for clockevents and clean it up Tony Lindgren
2008-03-17 9:42 ` Tony Lindgren [this message]
2008-03-17 9:42 ` [PATCH 14/14] ARM: OMAP: TimerMPU: Remove MPU-timer based sched_clock() Tony Lindgren
2008-03-20 16:52 ` [PATCH 12/14] ARM: OMAP1: Timer32K: Fix timer32K for clockevents and clean it up Russell King - ARM Linux
2008-03-20 18:25 ` Kevin Hilman
2008-03-21 11:38 ` Thomas Gleixner
2008-03-21 12:04 ` Russell King - ARM Linux
2008-03-25 10:09 ` [PATCH 12/14] ARM: OMAP1: Timer32K: Fix timer32K for clockevents and clean it up, take #2 Tony Lindgren
2008-03-25 22:16 ` Russell King - ARM Linux
2008-03-28 12:26 ` 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=1205746958-11242-14-git-send-email-tony@atomide.com \
--to=tony@atomide.com \
--cc=khilman@mvista.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-omap@vger.kernel.org \
/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