Commit 5d64bf6a authored by Philippe Gerum's avatar Philippe Gerum

ipipe: timer: notify co-kernel about entering ONESHOT_STOPPED mode

Although we don't want to disable the hardware not to wreck the
outstanding timing requests managed by the co-kernel, we should
nevertheless notify it about entering the ONESHOT_STOPPED mode, so
that it may disable the host tick emulation.
parent 76083c40
......@@ -370,6 +370,15 @@ static int do_set_oneshot(struct clock_event_device *cdev)
return 0;
}
static int do_set_oneshot_stopped(struct clock_event_device *cdev)
{
struct ipipe_timer *timer = __ipipe_raw_cpu_read(percpu_timer);
timer->mode_handler(CLOCK_EVT_MODE_SHUTDOWN, cdev);
return 0;
}
static int do_set_periodic(struct clock_event_device *cdev)
{
struct ipipe_timer *timer = __ipipe_raw_cpu_read(percpu_timer);
......@@ -440,7 +449,7 @@ static void grab_timer(void *arg)
if (timer->orig_set_state_oneshot)
evtdev->set_state_oneshot = do_set_oneshot;
if (timer->orig_set_state_oneshot_stopped)
evtdev->set_state_oneshot_stopped = do_set_oneshot;
evtdev->set_state_oneshot_stopped = do_set_oneshot_stopped;
if (timer->orig_set_state_shutdown)
evtdev->set_state_shutdown = do_set_shutdown;
evtdev->set_next_event = data->emutick;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment