mach-u300: cleanup clockevent code
Use the new clockevents_config_and_register() function to register the U300 clockevent, since that code requires ->cpumask to be set we set this even on this UP system to please the framework. Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Родитель
c5314877ed
Коммит
cde21de148
|
@ -27,9 +27,6 @@
|
|||
#include <asm/mach/time.h>
|
||||
#include <asm/mach/irq.h>
|
||||
|
||||
/* Be able to sleep for atleast 4 seconds (usually more) */
|
||||
#define APPTIMER_MIN_RANGE 4
|
||||
|
||||
/*
|
||||
* APP side special timer registers
|
||||
* This timer contains four timers which can fire an interrupt each.
|
||||
|
@ -413,16 +410,10 @@ static void __init u300_timer_init(void)
|
|||
"GPT2", rate, 300, 32, clocksource_mmio_readl_up))
|
||||
pr_err("timer: failed to initialize U300 clock source\n");
|
||||
|
||||
clockevents_calc_mult_shift(&clockevent_u300_1mhz,
|
||||
rate, APPTIMER_MIN_RANGE);
|
||||
/* 32bit counter, so 32bits delta is max */
|
||||
clockevent_u300_1mhz.max_delta_ns =
|
||||
clockevent_delta2ns(0xffffffff, &clockevent_u300_1mhz);
|
||||
/* This timer is slow enough to set for 1 cycle == 1 MHz */
|
||||
clockevent_u300_1mhz.min_delta_ns =
|
||||
clockevent_delta2ns(1, &clockevent_u300_1mhz);
|
||||
clockevent_u300_1mhz.cpumask = cpumask_of(0);
|
||||
clockevents_register_device(&clockevent_u300_1mhz);
|
||||
/* Configure and register the clockevent */
|
||||
clockevents_config_and_register(&clockevent_u300_1mhz, rate,
|
||||
1, 0xffffffff);
|
||||
|
||||
/*
|
||||
* TODO: init and register the rest of the timers too, they can be
|
||||
* used by hrtimers!
|
||||
|
|
Загрузка…
Ссылка в новой задаче