diff options
| -rw-r--r-- | arch/arm/kernel/smp_twd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/kernel/smp_twd.c b/arch/arm/kernel/smp_twd.c index e1f906989bb8..b22d700fea27 100644 --- a/arch/arm/kernel/smp_twd.c +++ b/arch/arm/kernel/smp_twd.c | |||
| @@ -42,10 +42,10 @@ static void twd_set_mode(enum clock_event_mode mode, | |||
| 42 | 42 | ||
| 43 | switch (mode) { | 43 | switch (mode) { |
| 44 | case CLOCK_EVT_MODE_PERIODIC: | 44 | case CLOCK_EVT_MODE_PERIODIC: |
| 45 | /* timer load already set up */ | ||
| 46 | ctrl = TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE | 45 | ctrl = TWD_TIMER_CONTROL_ENABLE | TWD_TIMER_CONTROL_IT_ENABLE |
| 47 | | TWD_TIMER_CONTROL_PERIODIC; | 46 | | TWD_TIMER_CONTROL_PERIODIC; |
| 48 | __raw_writel(twd_timer_rate / HZ, twd_base + TWD_TIMER_LOAD); | 47 | __raw_writel(DIV_ROUND_CLOSEST(twd_timer_rate, HZ), |
| 48 | twd_base + TWD_TIMER_LOAD); | ||
| 49 | break; | 49 | break; |
| 50 | case CLOCK_EVT_MODE_ONESHOT: | 50 | case CLOCK_EVT_MODE_ONESHOT: |
| 51 | /* period set, and timer enabled in 'next_event' hook */ | 51 | /* period set, and timer enabled in 'next_event' hook */ |
