Skip to content

Commit 12e4396

Browse files
atsushi-nemotoralfbaechle
authored andcommitted
[MIPS] No need to write c0_compare in plat_timer_setup
If R4k counter was used for hpt_timer and interrupt source, c0_hpt_timer_init() initializes the c0_compare register. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent a0574e0 commit 12e4396

5 files changed

Lines changed: 0 additions & 26 deletions

File tree

‎arch/mips/lasat/setup.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ static void lasat_time_init(void)
116116

117117
void __init plat_timer_setup(struct irqaction *irq)
118118
{
119-
write_c0_compare( read_c0_count() + mips_hpt_frequency / HZ);
120119
change_c0_status(ST0_IM, IE_IRQ0 | IE_IRQ5);
121120
}
122121

‎arch/mips/mips-boards/generic/time.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,4 @@ void __init plat_timer_setup(struct irqaction *irq)
295295
irq_desc[mips_cpu_timer_irq].status |= IRQ_PER_CPU;
296296
set_irq_handler(mips_cpu_timer_irq, handle_percpu_irq);
297297
#endif
298-
299-
/* to generate the first timer interrupt */
300-
write_c0_compare (read_c0_count() + mips_hpt_frequency/HZ);
301298
}

‎arch/mips/mips-boards/sim/sim_time.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,4 @@ void __init plat_timer_setup(struct irqaction *irq)
199199
irq_desc[mips_cpu_timer_irq].flags |= IRQ_PER_CPU;
200200
set_irq_handler(mips_cpu_timer_irq, handle_percpu_irq);
201201
#endif
202-
203-
/* to generate the first timer interrupt */
204-
write_c0_compare(read_c0_count() + (mips_hpt_frequency/HZ));
205202
}

‎arch/mips/tx4927/common/tx4927_setup.c‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,8 @@ void __init tx4927_time_init(void)
8181

8282
void __init plat_timer_setup(struct irqaction *irq)
8383
{
84-
u32 count;
85-
u32 c1;
86-
u32 c2;
87-
8884
setup_irq(TX4927_IRQ_CPU_TIMER, irq);
8985

90-
/* to generate the first timer interrupt */
91-
c1 = read_c0_count();
92-
count = c1 + (mips_hpt_frequency / HZ);
93-
write_c0_compare(count);
94-
c2 = read_c0_count();
95-
9686
#ifdef CONFIG_TOSHIBA_RBTX4927
9787
{
9888
extern void toshiba_rbtx4927_timer_setup(struct irqaction

‎arch/mips/tx4938/common/setup.c‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,5 @@ tx4938_time_init(void)
5555

5656
void __init plat_timer_setup(struct irqaction *irq)
5757
{
58-
u32 count;
59-
u32 c1;
60-
u32 c2;
61-
6258
setup_irq(TX4938_IRQ_CPU_TIMER, irq);
63-
64-
c1 = read_c0_count();
65-
count = c1 + (mips_hpt_frequency / HZ);
66-
write_c0_compare(count);
67-
c2 = read_c0_count();
6859
}

0 commit comments

Comments
 (0)