-/*
- * arch/arm/mach-lh7a40x/time.c
+/* include/asm-arm/arch-lh7a40x/time.h
*
* Copyright (C) 2004 Logic Product Development
*
* version 2 as published by the Free Software Foundation.
*
*/
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/interrupt.h>
-#include <linux/time.h>
-
-#include <asm/hardware.h>
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/leds.h>
-
-#include <asm/mach/time.h>
#if HZ < 100
# define TIMER_CONTROL TIMER_CONTROL1
lh7a40x_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
TIMER_EOI = 0;
- timer_tick(regs);
+ do_profile (regs);
+ do_leds();
+ do_set_rtc();
+ do_timer (regs);
return IRQ_HANDLED;
}
-static struct irqaction lh7a40x_timer_irq = {
- .name = "LHA740x Timer Tick",
- .flags = SA_INTERRUPT,
- .handler = lh7a40x_timer_interrupt
-};
-
-void __init lh7a40x_init_time(void)
+void __init time_init(void)
{
/* Stop/disable all timers */
TIMER_CONTROL1 = 0;
TIMER_CONTROL2 = 0;
TIMER_CONTROL3 = 0;
- setup_irq (TIMER_IRQ, &lh7a40x_timer_irq);
+ timer_irq.handler = lh7a40x_timer_interrupt;
+ timer_irq.flags |= SA_INTERRUPT;
+ setup_irq (TIMER_IRQ, &timer_irq);
TIMER_LOAD = TIMER_CONSTANT;
TIMER_CONTROL = TIMER_MODE;