m68knommu: cleanup 68328 timer code
authorGreg Ungerer <gerg@snapgear.com>
Wed, 24 Oct 2007 02:03:20 +0000 (12:03 +1000)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 24 Oct 2007 03:45:44 +0000 (20:45 -0700)
Use common function naming for 68328 timer functions to make them
consistent with the various other hardware m68knommu timers.

Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/m68knommu/platform/68328/timers.c

index 0396476f955d6de405ba7a62d5c9edb35f3d113a..04cbc661d4bdc16faf3e09f932186114b2fe4295 100644 (file)
 
 /***************************************************************************/
 
+static irqreturn_t hw_tick(int irq, void *dummy)
+{
+       /* Reset Timer1 */
+       TSTAT &= 0;
+
+       return arch_timer_interrupt(irq, dummy);
+}
+
+/***************************************************************************/
+
 static struct irqaction m68328_timer_irq = {
-       .name    = "timer",
-       .flags   = IRQF_DISABLED | IRQF_TIMER,
+       .name    = "timer",
+       .flags   = IRQF_DISABLED | IRQF_TIMER,
+       .handler = hw_tick,
 };
 
-void m68328_timer_init(irq_handler_t timer_routine)
+void hw_timer_init(void)
 {
        /* disable timer 1 */
        TCTL = 0;
 
        /* set ISR */
-       m68328_timer_irq.handler = timer_routine;
        setup_irq(TMR_IRQ_NUM, &m68328_timer_irq);
 
        /* Restart mode, Enable int, Set clock source */
@@ -78,14 +88,7 @@ void m68328_timer_init(irq_handler_t timer_routine)
 
 /***************************************************************************/
 
-void m68328_timer_tick(void)
-{
-       /* Reset Timer1 */
-       TSTAT &= 0;
-}
-/***************************************************************************/
-
-unsigned long m68328_timer_gettimeoffset(void)
+unsigned long hw_timer_offset(void)
 {
        unsigned long ticks = TCN, offset = 0;