aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-epxa10db/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-epxa10db/time.c')
-rw-r--r--arch/arm/mach-epxa10db/time.c78
1 files changed, 0 insertions, 78 deletions
diff --git a/arch/arm/mach-epxa10db/time.c b/arch/arm/mach-epxa10db/time.c
deleted file mode 100644
index 4b1084dde8dd..000000000000
--- a/arch/arm/mach-epxa10db/time.c
+++ /dev/null
@@ -1,78 +0,0 @@
1/*
2 * linux/arch/arm/mach-epxa10db/time.c
3 *
4 * Copyright (C) 2000 Deep Blue Solutions
5 * Copyright (C) 2001 Altera Corporation
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
10 */
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/interrupt.h>
14#include <linux/sched.h>
15
16#include <asm/hardware.h>
17#include <asm/system.h>
18#include <asm/leds.h>
19
20#include <asm/mach/time.h>
21
22#define TIMER00_TYPE (volatile unsigned int*)
23#include <asm/arch/timer00.h>
24
25static int epxa10db_set_rtc(void)
26{
27 return 1;
28}
29
30static int epxa10db_rtc_init(void)
31{
32 set_rtc = epxa10db_set_rtc;
33
34 return 0;
35}
36
37__initcall(epxa10db_rtc_init);
38
39
40/*
41 * IRQ handler for the timer
42 */
43static irqreturn_t
44epxa10db_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
45{
46 write_seqlock(&xtime_lock);
47
48 // ...clear the interrupt
49 *TIMER0_CR(IO_ADDRESS(EXC_TIMER00_BASE))|=TIMER0_CR_CI_MSK;
50
51 timer_tick(regs);
52 write_sequnlock(&xtime_lock);
53
54 return IRQ_HANDLED;
55}
56
57static struct irqaction epxa10db_timer_irq = {
58 .name = "Excalibur Timer Tick",
59 .flags = SA_INTERRUPT | SA_TIMER,
60 .handler = epxa10db_timer_interrupt,
61};
62
63/*
64 * Set up timer interrupt, and return the current time in seconds.
65 */
66static void __init epxa10db_timer_init(void)
67{
68 /* Start the timer */
69 *TIMER0_LIMIT(IO_ADDRESS(EXC_TIMER00_BASE))=(unsigned int)(EXC_AHB2_CLK_FREQUENCY/200);
70 *TIMER0_PRESCALE(IO_ADDRESS(EXC_TIMER00_BASE))=1;
71 *TIMER0_CR(IO_ADDRESS(EXC_TIMER00_BASE))=TIMER0_CR_IE_MSK | TIMER0_CR_S_MSK;
72
73 setup_irq(IRQ_TIMER0, &epxa10db_timer_irq);
74}
75
76struct sys_timer epxa10db_timer = {
77 .init = epxa10db_timer_init,
78};