diff options
Diffstat (limited to 'arch/mips/au1000/common/time.c')
-rw-r--r-- | arch/mips/au1000/common/time.c | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/arch/mips/au1000/common/time.c b/arch/mips/au1000/common/time.c index 8fc29982d700..2556399708ba 100644 --- a/arch/mips/au1000/common/time.c +++ b/arch/mips/au1000/common/time.c | |||
@@ -64,48 +64,8 @@ static unsigned long last_pc0, last_match20; | |||
64 | 64 | ||
65 | static DEFINE_SPINLOCK(time_lock); | 65 | static DEFINE_SPINLOCK(time_lock); |
66 | 66 | ||
67 | static inline void ack_r4ktimer(unsigned long newval) | ||
68 | { | ||
69 | write_c0_compare(newval); | ||
70 | } | ||
71 | |||
72 | /* | ||
73 | * There are a lot of conceptually broken versions of the MIPS timer interrupt | ||
74 | * handler floating around. This one is rather different, but the algorithm | ||
75 | * is provably more robust. | ||
76 | */ | ||
77 | unsigned long wtimer; | 67 | unsigned long wtimer; |
78 | 68 | ||
79 | void mips_timer_interrupt(void) | ||
80 | { | ||
81 | int irq = 63; | ||
82 | |||
83 | irq_enter(); | ||
84 | kstat_this_cpu.irqs[irq]++; | ||
85 | |||
86 | if (r4k_offset == 0) | ||
87 | goto null; | ||
88 | |||
89 | do { | ||
90 | kstat_this_cpu.irqs[irq]++; | ||
91 | do_timer(1); | ||
92 | #ifndef CONFIG_SMP | ||
93 | update_process_times(user_mode(get_irq_regs())); | ||
94 | #endif | ||
95 | r4k_cur += r4k_offset; | ||
96 | ack_r4ktimer(r4k_cur); | ||
97 | |||
98 | } while (((unsigned long)read_c0_count() | ||
99 | - r4k_cur) < 0x7fffffff); | ||
100 | |||
101 | irq_exit(); | ||
102 | return; | ||
103 | |||
104 | null: | ||
105 | ack_r4ktimer(0); | ||
106 | irq_exit(); | ||
107 | } | ||
108 | |||
109 | #ifdef CONFIG_PM | 69 | #ifdef CONFIG_PM |
110 | irqreturn_t counter0_irq(int irq, void *dev_id) | 70 | irqreturn_t counter0_irq(int irq, void *dev_id) |
111 | { | 71 | { |
@@ -240,7 +200,7 @@ unsigned long cal_r4koff(void) | |||
240 | while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T1S); | 200 | while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_T1S); |
241 | 201 | ||
242 | while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S); | 202 | while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S); |
243 | au_writel (0, SYS_TOYWRITE); | 203 | au_writel(0, SYS_TOYWRITE); |
244 | while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S); | 204 | while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_C1S); |
245 | 205 | ||
246 | cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * | 206 | cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * |
@@ -329,7 +289,3 @@ void __init plat_timer_setup(struct irqaction *irq) | |||
329 | 289 | ||
330 | #endif | 290 | #endif |
331 | } | 291 | } |
332 | |||
333 | void __init au1xxx_time_init(void) | ||
334 | { | ||
335 | } | ||