@@ -290,15 +290,11 @@ static struct clock_event_device clockevent_mxc = {
.name = "mxc_timer1",
.features = CLOCK_EVT_FEAT_ONESHOT,
.set_mode = mxc_set_mode,
- .set_next_event = mx1_2_set_next_event,
.rating = 200,
};
static int __init mxc_clockevent_init(void)
{
- if (timer_is_v2())
- clockevent_mxc.set_next_event = v2_set_next_event;
-
clockevent_mxc.cpumask = cpumask_of(0);
clockevents_config_and_register(&clockevent_mxc,
clk_get_rate(imxtm.clk_per),
@@ -351,15 +347,19 @@ static void __init imx_timer_data_init(void)
switch (imxtm.type) {
case GPT_TYPE_IMX1:
imxtm.gpt_setup_tctl = imx1_gpt_setup_tctl;
+ clockevent_mxc.set_next_event = mx1_2_set_next_event;
break;
case GPT_TYPE_IMX21:
imxtm.gpt_setup_tctl = imx21_gpt_setup_tctl;
+ clockevent_mxc.set_next_event = mx1_2_set_next_event;
break;
case GPT_TYPE_IMX31:
imxtm.gpt_setup_tctl = imx31_gpt_setup_tctl;
+ clockevent_mxc.set_next_event = v2_set_next_event;
break;
case GPT_TYPE_IMX6DL:
imxtm.gpt_setup_tctl = imx6dl_gpt_setup_tctl;
+ clockevent_mxc.set_next_event = v2_set_next_event;
break;
default:
BUG();