Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: cevt-r4k: Migrate to new 'set-state' interface

Migrate cevt-4k 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.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Andrew Bresticker <abrestic@chromium.org>
Cc: Qais Yousef <qais.yousef@imgtec.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Leonid Yegoshin <Leonid.Yegoshin@imgtec.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: linux-mips@linux-mips.org
Cc: linaro-kernel@lists.linaro.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Patchwork: https://patchwork.linux-mips.org/patch/10605/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Viresh Kumar and committed by
Ralf Baechle
877c61dc c88f2fb4

-8
-1
arch/mips/include/asm/cevt-r4k.h
··· 21 21 22 22 void mips_event_handler(struct clock_event_device *dev); 23 23 int c0_compare_int_usable(void); 24 - void mips_set_clock_mode(enum clock_event_mode, struct clock_event_device *); 25 24 irqreturn_t c0_compare_interrupt(int, void *); 26 25 27 26 extern struct irqaction c0_compare_irqaction;
-7
arch/mips/kernel/cevt-r4k.c
··· 28 28 return res; 29 29 } 30 30 31 - void mips_set_clock_mode(enum clock_event_mode mode, 32 - struct clock_event_device *evt) 33 - { 34 - /* Nothing to do ... */ 35 - } 36 - 37 31 DEFINE_PER_CPU(struct clock_event_device, mips_clockevent_device); 38 32 int cp0_timer_irq_installed; 39 33 ··· 209 215 cd->irq = irq; 210 216 cd->cpumask = cpumask_of(cpu); 211 217 cd->set_next_event = mips_next_event; 212 - cd->set_mode = mips_set_clock_mode; 213 218 cd->event_handler = mips_event_handler; 214 219 215 220 clockevents_register_device(cd);