ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[linux-2.6.git] / include / asm-arm / arch-tbox / time.h
1 /*
2  * linux/include/asm-arm/arch-tbox/time.h
3  *
4  * Copyright (c) 1997, 1999 Phil Blundell.
5  * Copyright (c) 2000 FutureTV Labs Ltd
6  *
7  * Tbox has no real-time clock -- we get millisecond ticks to update
8  * our soft copy.
9  */
10
11 /*
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version
15  * 2 of the License, or (at your option) any later version.
16  */
17
18 #include <asm/io.h>
19 #include <asm/hardware.h>
20
21 #define update_rtc()
22
23 static irqreturn_t
24 timer_interrupt (int irq, void *dev_id, struct pt_regs *regs)
25 {
26         /* Clear irq */
27         __raw_writel(1, FPGA1CONT + 0xc); 
28         __raw_writel(0, FPGA1CONT + 0xc);
29
30         do_timer(regs);
31
32         return IRQ_HANDLED;
33 }
34
35 void __init time_init(void)
36 {
37         timer_irq.handler = timer_interrupt;
38         setup_irq(IRQ_TIMER, &timer_irq);
39 }