Russell King | bc28248 | 2009-05-17 18:58:34 +0100 | [diff] [blame] | 1 | /* |
| 2 | * arch/arm/include/asm/localtimer.h |
| 3 | * |
| 4 | * Copyright (C) 2004-2005 ARM Ltd. |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License version 2 as |
| 8 | * published by the Free Software Foundation. |
| 9 | */ |
| 10 | #ifndef __ASM_ARM_LOCALTIMER_H |
| 11 | #define __ASM_ARM_LOCALTIMER_H |
| 12 | |
Shawn Guo | bb1ac3e | 2011-10-06 14:57:24 +0100 | [diff] [blame] | 13 | #include <linux/errno.h> |
| 14 | |
Russell King | bc28248 | 2009-05-17 18:58:34 +0100 | [diff] [blame] | 15 | struct clock_event_device; |
| 16 | |
Marc Zyngier | 0ef330e | 2012-01-10 19:26:45 +0000 | [diff] [blame] | 17 | struct local_timer_ops { |
| 18 | int (*setup)(struct clock_event_device *); |
| 19 | void (*stop)(struct clock_event_device *); |
| 20 | }; |
| 21 | |
Russell King | bc28248 | 2009-05-17 18:58:34 +0100 | [diff] [blame] | 22 | #ifdef CONFIG_LOCAL_TIMERS |
| 23 | /* |
Marc Zyngier | 0ef330e | 2012-01-10 19:26:45 +0000 | [diff] [blame] | 24 | * Register a local timer driver |
| 25 | */ |
| 26 | int local_timer_register(struct local_timer_ops *); |
Santosh Shilimkar | af90f10 | 2011-02-23 18:53:15 +0100 | [diff] [blame] | 27 | #else |
Marc Zyngier | 0ef330e | 2012-01-10 19:26:45 +0000 | [diff] [blame] | 28 | static inline int local_timer_register(struct local_timer_ops *ops) |
| 29 | { |
| 30 | return -ENXIO; |
| 31 | } |
Russell King | bc28248 | 2009-05-17 18:58:34 +0100 | [diff] [blame] | 32 | #endif |
| 33 | |
| 34 | #endif |