diff options
author | Guo Ren <ren_guo@c-sky.com> | 2018-12-20 02:21:41 -0500 |
---|---|---|
committer | Guo Ren <ren_guo@c-sky.com> | 2018-12-31 09:58:48 -0500 |
commit | 1d95fe4d3de42e915bc22d5fd6cd4de103c5e517 (patch) | |
tree | 95a918b141f5d660ad36a82543ffd7ef5b858e5e /drivers/clocksource/timer-mp-csky.c | |
parent | 789154c2ad74c29c3c60c5136c1785745abe4897 (diff) |
clocksource/drivers/c-sky: fixup qemu fail to bootup sometimes.
Timer startup must after timer_irq_enable. For qemu, timer tick
irq hanppens but irq not enable, so it will cause qemu boot failed.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
Tested-by: Liu Zhiwei <zhiwei_liu@c-sky.com>
Diffstat (limited to 'drivers/clocksource/timer-mp-csky.c')
-rw-r--r-- | drivers/clocksource/timer-mp-csky.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clocksource/timer-mp-csky.c b/drivers/clocksource/timer-mp-csky.c index a8acc431a774..3cb6dbc88b6d 100644 --- a/drivers/clocksource/timer-mp-csky.c +++ b/drivers/clocksource/timer-mp-csky.c | |||
@@ -79,11 +79,11 @@ static int csky_mptimer_starting_cpu(unsigned int cpu) | |||
79 | 79 | ||
80 | to->clkevt.cpumask = cpumask_of(cpu); | 80 | to->clkevt.cpumask = cpumask_of(cpu); |
81 | 81 | ||
82 | enable_percpu_irq(csky_mptimer_irq, 0); | ||
83 | |||
82 | clockevents_config_and_register(&to->clkevt, timer_of_rate(to), | 84 | clockevents_config_and_register(&to->clkevt, timer_of_rate(to), |
83 | 2, ULONG_MAX); | 85 | 2, ULONG_MAX); |
84 | 86 | ||
85 | enable_percpu_irq(csky_mptimer_irq, 0); | ||
86 | |||
87 | return 0; | 87 | return 0; |
88 | } | 88 | } |
89 | 89 | ||