1 /* include/asm-arm/arch-lh7a40x/time.h
3 * Copyright (C) 2004 Logic Product Development
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * version 2 as published by the Free Software Foundation.
12 # define TIMER_CONTROL TIMER_CONTROL1
13 # define TIMER_LOAD TIMER_LOAD1
14 # define TIMER_CONSTANT (508469/HZ)
15 # define TIMER_MODE (TIMER_C_ENABLE | TIMER_C_PERIODIC | TIMER_C_508KHZ)
16 # define TIMER_EOI TIMER_EOI1
17 # define TIMER_IRQ IRQ_T1UI
19 # define TIMER_CONTROL TIMER_CONTROL3
20 # define TIMER_LOAD TIMER_LOAD3
21 # define TIMER_CONSTANT (3686400/HZ)
22 # define TIMER_MODE (TIMER_C_ENABLE | TIMER_C_PERIODIC)
23 # define TIMER_EOI TIMER_EOI3
24 # define TIMER_IRQ IRQ_T3UI
28 lh7a40x_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
39 void __init time_init(void)
41 /* Stop/disable all timers */
46 timer_irq.handler = lh7a40x_timer_interrupt;
47 timer_irq.flags |= SA_INTERRUPT;
48 setup_irq (TIMER_IRQ, &timer_irq);
50 TIMER_LOAD = TIMER_CONSTANT;
51 TIMER_CONTROL = TIMER_MODE;