aboutsummaryrefslogtreecommitdiff
path: root/arch/microblaze
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2014-06-10 13:52:25 +0530
committerGary S. Robertson <gary.robertson@linaro.org>2015-01-19 19:14:01 -0600
commitbfe18c296e7616de35986511d680149524e82088 (patch)
tree057f4d2bce0ab92aafc0286f12bcfe088f8ef3c4 /arch/microblaze
parentb9992eec5682ff1db079b5d09844c603b33526de (diff)
clockevents: misc: add support for ONESHOT_STOPPED mode
Clockevent devices can be stopped from core (hrtimers/tick) when they aren't used anymore. This will mostly happen on a idle or tickless cpu. This is done to avoid getting spurious interrupts when core doesn't want to handle them anymore. For stopping clockevent devices, core requests drivers to switch to a special optional mode: CLOCK_EVT_MODE_ONESHOT_STOPPED. At this time platforms can also save some power by disabling these devices. This patch adds support for handling CLOCK_EVT_MODE_ONESHOT_STOPPED mode for all architectures that have single clockevent driver (to limit patch count). Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org>
Diffstat (limited to 'arch/microblaze')
-rw-r--r--arch/microblaze/kernel/timer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c
index 35a512f67be2..44a8a0bad0ac 100644
--- a/arch/microblaze/kernel/timer.c
+++ b/arch/microblaze/kernel/timer.c
@@ -109,6 +109,10 @@ static int xilinx_timer_set_mode(enum clock_event_mode mode,
case CLOCK_EVT_MODE_ONESHOT:
pr_info("%s: oneshot\n", __func__);
break;
+ case CLOCK_EVT_MODE_ONESHOT_STOPPED:
+ pr_info("%s: oneshot stopped\n", __func__);
+ xilinx_timer0_stop();
+ break;
case CLOCK_EVT_MODE_UNUSED:
pr_info("%s: unused\n", __func__);
break;