Skip to content

Commit

Permalink
[MIPS] time: set clock before clockevent_delta2ns() in GT641xx.
Browse files Browse the repository at this point in the history
clockevent_delta2ns() use the shift and mult value, so
clockevent_set_clock() should be called first.
Pointed out by Atsushi Nemoto.

Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Yoichi Yuasa authored and Ralf Baechle committed Oct 29, 2007
1 parent c984c87 commit 11c03a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/kernel/cevt-gt641xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ static int __init gt641xx_timer0_clockevent_init(void)

cd = &gt641xx_timer0_clockevent;
cd->rating = 200 + gt641xx_base_clock / 10000000;
clockevent_set_clock(cd, gt641xx_base_clock);
cd->max_delta_ns = clockevent_delta2ns(0x7fffffff, cd);
cd->min_delta_ns = clockevent_delta2ns(0x300, cd);
clockevent_set_clock(cd, gt641xx_base_clock);

clockevents_register_device(&gt641xx_timer0_clockevent);

Expand Down

0 comments on commit 11c03a6

Please sign in to comment.