2 * linux/include/asm-arm/arch-ebsa110/time.h
4 * Copyright (c) 1996,1997,1998 Russell King.
6 * No real time clock on the evalulation board!
9 * 10-Oct-1996 RMK Created
10 * 04-Dec-1997 RMK Updated for new arch/arm/kernel/time.c
11 * 07-Aug-1998 RMK Updated for arch/arm/kernel/leds.c
12 * 28-Dec-1998 APH Made leds code optional
19 #if defined(MCLK_42_3)
20 #define PIT1_COUNT 0xecbe
21 #elif defined(MCLK_47_8)
23 * This should be 0x10B43, but that doesn't exactly fit.
24 * We run the timer interrupt at 5ms, and then divide it by
25 * two in software... This is so that the user processes
26 * see exactly the same model whichever ARM processor they're
29 #define PIT1_COUNT 0x85A1
33 static void timer_interrupt(int irq
, void *dev_id
, struct pt_regs
*regs
)
35 *PIT_T1
= (PIT1_COUNT
) & 0xff;
36 *PIT_T1
= (PIT1_COUNT
) >> 8;
40 static unsigned int divisor
;
44 divisor
= DIVISOR
- 1;
53 * Set up timer interrupt.
55 extern __inline__
void setup_timer(void)
58 * Timer 1, mode 0, 16-bit, autoreload
63 * Refresh counter clocked at 47.8MHz/7 = 146.4ns
64 * We want centi-second interrupts
66 *PIT_T1
= (PIT1_COUNT
) & 0xff;
67 *PIT_T1
= (PIT1_COUNT
) >> 8;
69 timer_irq
.handler
= timer_interrupt
;
71 setup_arm_irq(IRQ_EBSA110_TIMER0
, &timer_irq
);