diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-07-16 07:26:19 -0400 |
---|---|---|
committer | Richard Kuo <rkuo@codeaurora.org> | 2015-09-08 19:43:17 -0400 |
commit | d70e22d5bcf700a53881acad71a6c669be6eec93 (patch) | |
tree | 39de12eeef6c42119db1791b997e627fdef46bce /arch/hexagon/kernel | |
parent | 64291f7db5bd8150a74ad2036f1037e6a0428df2 (diff) |
hexagon/time: Migrate to new 'set-state' interface
Migrate hexagon driver to the new 'set-state' interface provided by
clockevents core, the earlier 'set-mode' interface is marked obsolete
now.
This also enables us to implement callbacks for new states of clockevent
devices, for example: ONESHOT_STOPPED.
We weren't doing anything in the ->set_mode() callback. So, this patch
doesn't provide any set-state callbacks.
Cc: linux-hexagon@vger.kernel.org
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Richard Kuo <rkuo@codeaurora.org>
Diffstat (limited to 'arch/hexagon/kernel')
-rw-r--r-- | arch/hexagon/kernel/time.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/arch/hexagon/kernel/time.c b/arch/hexagon/kernel/time.c index 17fbf45bf150..a6a1d1f8309a 100644 --- a/arch/hexagon/kernel/time.c +++ b/arch/hexagon/kernel/time.c | |||
@@ -97,20 +97,6 @@ static int set_next_event(unsigned long delta, struct clock_event_device *evt) | |||
97 | return 0; | 97 | return 0; |
98 | } | 98 | } |
99 | 99 | ||
100 | /* | ||
101 | * Sets the mode (periodic, shutdown, oneshot, etc) of a timer. | ||
102 | */ | ||
103 | static void set_mode(enum clock_event_mode mode, | ||
104 | struct clock_event_device *evt) | ||
105 | { | ||
106 | switch (mode) { | ||
107 | case CLOCK_EVT_MODE_SHUTDOWN: | ||
108 | /* XXX implement me */ | ||
109 | default: | ||
110 | break; | ||
111 | } | ||
112 | } | ||
113 | |||
114 | #ifdef CONFIG_SMP | 100 | #ifdef CONFIG_SMP |
115 | /* Broadcast mechanism */ | 101 | /* Broadcast mechanism */ |
116 | static void broadcast(const struct cpumask *mask) | 102 | static void broadcast(const struct cpumask *mask) |
@@ -119,13 +105,13 @@ static void broadcast(const struct cpumask *mask) | |||
119 | } | 105 | } |
120 | #endif | 106 | #endif |
121 | 107 | ||
108 | /* XXX Implement set_state_shutdown() */ | ||
122 | static struct clock_event_device hexagon_clockevent_dev = { | 109 | static struct clock_event_device hexagon_clockevent_dev = { |
123 | .name = "clockevent", | 110 | .name = "clockevent", |
124 | .features = CLOCK_EVT_FEAT_ONESHOT, | 111 | .features = CLOCK_EVT_FEAT_ONESHOT, |
125 | .rating = 400, | 112 | .rating = 400, |
126 | .irq = RTOS_TIMER_INT, | 113 | .irq = RTOS_TIMER_INT, |
127 | .set_next_event = set_next_event, | 114 | .set_next_event = set_next_event, |
128 | .set_mode = set_mode, | ||
129 | #ifdef CONFIG_SMP | 115 | #ifdef CONFIG_SMP |
130 | .broadcast = broadcast, | 116 | .broadcast = broadcast, |
131 | #endif | 117 | #endif |
@@ -146,7 +132,6 @@ void setup_percpu_clockdev(void) | |||
146 | 132 | ||
147 | dummy_clock_dev->features = CLOCK_EVT_FEAT_DUMMY; | 133 | dummy_clock_dev->features = CLOCK_EVT_FEAT_DUMMY; |
148 | dummy_clock_dev->cpumask = cpumask_of(cpu); | 134 | dummy_clock_dev->cpumask = cpumask_of(cpu); |
149 | dummy_clock_dev->mode = CLOCK_EVT_MODE_UNUSED; | ||
150 | 135 | ||
151 | clockevents_register_device(dummy_clock_dev); | 136 | clockevents_register_device(dummy_clock_dev); |
152 | } | 137 | } |