summaryrefslogtreecommitdiffstats
path: root/arch/openrisc/kernel/time.c
AgeCommit message (Collapse)Author
2015-08-10openrisc/time: Migrate to new 'set-state' interfaceViresh Kumar
Migrate openrisc 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: Jonas Bonn <jonas@southpole.se> Cc: linux@lists.openrisc.net Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
2012-02-17openrisc: Set shortest clock event to 100 ticksJonas Bonn
It takes a couple of instructions to actually configure a clock event so setting an alarm just 1 clock cycle in the future isn't going to work; doing so results in setting an alarm in the "past" in which case the event won't fire until the timer overflows and rolls back around to the "current time". Not quite sure how many clock cycles it actually takes to get through to actually writing the register, but 100 seems to work reliably. Use generic helper to set up the clock event while we're at it. Reported-by: Jan Schulte <jan.schulte@aacmicrotec.com> Signed-off-by: Jonas Bonn <jonas@southpole.se>
2011-07-22OpenRISC: TimekeepingJonas Bonn
Implements support for the OpenRISC timer which is a 28 bit cycle counter that can be read out of a special purpose register. This counter is used as a both a clock event and clocksource device. Signed-off-by: Jonas Bonn <jonas@southpole.se> Cc: tglx@linutronix.de Reviewed-by: Arnd Bergmann <arnd@arndb.de>