static void xilinx_timer_set_mode(enum clock_event_mode mode, struct clock_event_device *evt) { switch (mode) { case CLOCK_EVT_MODE_PERIODIC: pr_info("%s: periodic\n", __func__); xilinx_timer0_start_periodic(freq_div_hz); break; case CLOCK_EVT_MODE_ONESHOT: pr_info("%s: oneshot\n", __func__); break; case CLOCK_EVT_MODE_UNUSED: pr_info("%s: unused\n", __func__); break; case CLOCK_EVT_MODE_SHUTDOWN: pr_info("%s: shutdown\n", __func__); xilinx_timer0_stop(); break; case CLOCK_EVT_MODE_RESUME: pr_info("%s: resume\n", __func__); break; } }
static int xilinx_timer_set_periodic(struct clock_event_device *evt) { pr_info("%s\n", __func__); xilinx_timer0_start_periodic(freq_div_hz); return 0; }