git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create tag
[linux-2.6.git]
/
include
/
asm-arm
/
arch-omap
/
time.h
diff --git
a/arch/arm/mach-omap/time.c
b/include/asm-arm/arch-omap/time.h
similarity index 89%
rename from
arch/arm/mach-omap/time.c
rename to
include/asm-arm/arch-omap/time.h
index
cb3c5d6
..
85d4812
100644
(file)
--- a/
arch/arm/mach-omap/time.c
+++ b/
include/asm-arm/arch-omap/time.h
@@
-1,7
+1,7
@@
/*
/*
- *
arch/arm/mach-omap/time.c
+ *
linux/include/asm-arm/arch-omap/time.h
*
*
- *
OMAP Timer Tick
+ *
32kHz timer definition
*
* Copyright (C) 2000 RidgeRun, Inc.
* Author: Greg Lonnon <glonnon@ridgerun.com>
*
* Copyright (C) 2000 RidgeRun, Inc.
* Author: Greg Lonnon <glonnon@ridgerun.com>
@@
-26,21
+26,17
@@
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
* with this program; if not, write to the Free Software Foundation, Inc.,
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#if !defined(__ASM_ARCH_OMAP_TIME_H)
+#define __ASM_ARCH_OMAP_TIME_H
#include <linux/config.h>
#include <linux/config.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
#include <linux/delay.h>
#include <linux/delay.h>
-#include <linux/interrupt.h>
-#include <linux/sched.h>
-
#include <asm/system.h>
#include <asm/hardware.h>
#include <asm/io.h>
#include <asm/leds.h>
#include <asm/irq.h>
#include <asm/mach/irq.h>
#include <asm/system.h>
#include <asm/hardware.h>
#include <asm/io.h>
#include <asm/leds.h>
#include <asm/irq.h>
#include <asm/mach/irq.h>
-#include <asm/mach/time.h>
#include <asm/arch/clocks.h>
#ifndef __instrument
#include <asm/arch/clocks.h>
#ifndef __instrument
@@
-166,14
+162,14
@@
unsigned long __noinstrument machinecycles_to_usecs(unsigned long mputicks)
*/
static unsigned long systimer_mark;
*/
static unsigned long systimer_mark;
-static unsigned long omap_gettimeoffset(void)
+static unsigned long omap
1510
_gettimeoffset(void)
{
/* Return elapsed usecs since last system timer ISR */
return machinecycles_to_usecs(do_getmachinecycles() - systimer_mark);
}
static irqreturn_t
{
/* Return elapsed usecs since last system timer ISR */
return machinecycles_to_usecs(do_getmachinecycles() - systimer_mark);
}
static irqreturn_t
-omap_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+omap
1510
_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
unsigned long now, ilatency;
{
unsigned long now, ilatency;
@@
-188,30
+184,29
@@
omap_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
ilatency = MPUTICKS_PER_SEC / 100 - read_mputimer2();
systimer_mark = now - ilatency;
ilatency = MPUTICKS_PER_SEC / 100 - read_mputimer2();
systimer_mark = now - ilatency;
- timer_tick(regs);
+ do_leds();
+ do_timer(regs);
+ do_profile(regs);
return IRQ_HANDLED;
}
return IRQ_HANDLED;
}
-static struct irqaction omap_timer_irq = {
- .name = "OMAP Timer Tick",
- .flags = SA_INTERRUPT,
- .handler = omap_timer_interrupt
-};
-
-void __init omap_init_time(void)
+void __init time_init(void)
{
/* Since we don't call request_irq, we must init the structure */
{
/* Since we don't call request_irq, we must init the structure */
- gettimeoffset = omap_gettimeoffset;
+ gettimeoffset = omap
1510
_gettimeoffset;
+ timer_irq.handler = omap1510_timer_interrupt;
+ timer_irq.flags = SA_INTERRUPT;
#ifdef OMAP1510_USE_32KHZ_TIMER
timer32k_write(TIMER32k_CR, 0x0);
timer32k_write(TIMER32k_TVR,TIMER32k_PERIOD);
#ifdef OMAP1510_USE_32KHZ_TIMER
timer32k_write(TIMER32k_CR, 0x0);
timer32k_write(TIMER32k_TVR,TIMER32k_PERIOD);
- setup_irq(INT_OS_32kHz_TIMER, &
omap_
timer_irq);
+ setup_irq(INT_OS_32kHz_TIMER, &timer_irq);
start_timer32k();
#else
start_timer32k();
#else
- setup_irq(INT_TIMER2, &
omap_
timer_irq);
+ setup_irq(INT_TIMER2, &timer_irq);
start_mputimer2(MPUTICKS_PER_SEC / 100 - 1);
#endif
}
start_mputimer2(MPUTICKS_PER_SEC / 100 - 1);
#endif
}
+#endif