#include <linux/errno.h>
#include <linux/profile.h>
#include <linux/sysdev.h>
+#include <linux/timer.h>
#include <asm/hardware.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/leds.h>
+#include <asm/mach/time.h>
+
u64 jiffies_64 = INITIAL_JIFFIES;
EXPORT_SYMBOL(jiffies_64);
/* change this if you have some constant time drift */
#define USECS_PER_JIFFY (1000000/HZ)
-static int dummy_set_rtc(void)
-{
- return 0;
-}
/*
* hook for setting the RTC's idea of the current time.
*/
-int (*set_rtc)(void) = dummy_set_rtc;
+int (*set_rtc)(void);
static unsigned long dummy_gettimeoffset(void)
{
#endif
#ifdef CONFIG_LEDS_TIMER
-static void do_leds(void)
+static inline void do_leds(void)
{
static unsigned int count = 50;
}
}
#else
-#define do_leds()
+#define do_leds()
#endif
void do_gettimeofday(struct timeval *tv)
EXPORT_SYMBOL(do_settimeofday);
-static struct irqaction timer_irq = {
- .name = "timer",
- .flags = SA_INTERRUPT,
-};
+void timer_tick(struct pt_regs *regs)
+{
+ do_profile(regs);
+ do_leds();
+ do_set_rtc();
+ do_timer(regs);
+}
+
+void (*init_arch_time)(void);
+
+void __init time_init(void)
+{
+ init_arch_time();
+}
-/*
- * Include architecture specific code
- */
-#include <asm/arch/time.h>