aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/clockchips.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/clockchips.h')
-rw-r--r--include/linux/clockchips.h44
1 files changed, 28 insertions, 16 deletions
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 66346521cb65..963d71431388 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -8,6 +8,20 @@
8#ifndef _LINUX_CLOCKCHIPS_H 8#ifndef _LINUX_CLOCKCHIPS_H
9#define _LINUX_CLOCKCHIPS_H 9#define _LINUX_CLOCKCHIPS_H
10 10
11/* Clock event notification values */
12enum clock_event_nofitiers {
13 CLOCK_EVT_NOTIFY_ADD,
14 CLOCK_EVT_NOTIFY_BROADCAST_ON,
15 CLOCK_EVT_NOTIFY_BROADCAST_OFF,
16 CLOCK_EVT_NOTIFY_BROADCAST_FORCE,
17 CLOCK_EVT_NOTIFY_BROADCAST_ENTER,
18 CLOCK_EVT_NOTIFY_BROADCAST_EXIT,
19 CLOCK_EVT_NOTIFY_SUSPEND,
20 CLOCK_EVT_NOTIFY_RESUME,
21 CLOCK_EVT_NOTIFY_CPU_DYING,
22 CLOCK_EVT_NOTIFY_CPU_DEAD,
23};
24
11#ifdef CONFIG_GENERIC_CLOCKEVENTS_BUILD 25#ifdef CONFIG_GENERIC_CLOCKEVENTS_BUILD
12 26
13#include <linux/clocksource.h> 27#include <linux/clocksource.h>
@@ -26,20 +40,6 @@ enum clock_event_mode {
26 CLOCK_EVT_MODE_RESUME, 40 CLOCK_EVT_MODE_RESUME,
27}; 41};
28 42
29/* Clock event notification values */
30enum clock_event_nofitiers {
31 CLOCK_EVT_NOTIFY_ADD,
32 CLOCK_EVT_NOTIFY_BROADCAST_ON,
33 CLOCK_EVT_NOTIFY_BROADCAST_OFF,
34 CLOCK_EVT_NOTIFY_BROADCAST_FORCE,
35 CLOCK_EVT_NOTIFY_BROADCAST_ENTER,
36 CLOCK_EVT_NOTIFY_BROADCAST_EXIT,
37 CLOCK_EVT_NOTIFY_SUSPEND,
38 CLOCK_EVT_NOTIFY_RESUME,
39 CLOCK_EVT_NOTIFY_CPU_DYING,
40 CLOCK_EVT_NOTIFY_CPU_DEAD,
41};
42
43/* 43/*
44 * Clock event features 44 * Clock event features
45 */ 45 */
@@ -55,6 +55,11 @@ enum clock_event_nofitiers {
55#define CLOCK_EVT_FEAT_C3STOP 0x000008 55#define CLOCK_EVT_FEAT_C3STOP 0x000008
56#define CLOCK_EVT_FEAT_DUMMY 0x000010 56#define CLOCK_EVT_FEAT_DUMMY 0x000010
57 57
58/*
59 * Core shall set the interrupt affinity dynamically in broadcast mode
60 */
61#define CLOCK_EVT_FEAT_DYNIRQ 0x000020
62
58/** 63/**
59 * struct clock_event_device - clock event device descriptor 64 * struct clock_event_device - clock event device descriptor
60 * @event_handler: Assigned by the framework to be called by the low 65 * @event_handler: Assigned by the framework to be called by the low
@@ -170,10 +175,16 @@ extern void tick_broadcast(const struct cpumask *mask);
170extern int tick_receive_broadcast(void); 175extern int tick_receive_broadcast(void);
171#endif 176#endif
172 177
178#if defined(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) && defined(CONFIG_TICK_ONESHOT)
179extern int tick_check_broadcast_expired(void);
180#else
181static inline int tick_check_broadcast_expired(void) { return 0; }
182#endif
183
173#ifdef CONFIG_GENERIC_CLOCKEVENTS 184#ifdef CONFIG_GENERIC_CLOCKEVENTS
174extern void clockevents_notify(unsigned long reason, void *arg); 185extern void clockevents_notify(unsigned long reason, void *arg);
175#else 186#else
176# define clockevents_notify(reason, arg) do { } while (0) 187static inline void clockevents_notify(unsigned long reason, void *arg) {}
177#endif 188#endif
178 189
179#else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ 190#else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */
@@ -181,7 +192,8 @@ extern void clockevents_notify(unsigned long reason, void *arg);
181static inline void clockevents_suspend(void) {} 192static inline void clockevents_suspend(void) {}
182static inline void clockevents_resume(void) {} 193static inline void clockevents_resume(void) {}
183 194
184#define clockevents_notify(reason, arg) do { } while (0) 195static inline void clockevents_notify(unsigned long reason, void *arg) {}
196static inline int tick_check_broadcast_expired(void) { return 0; }
185 197
186#endif 198#endif
187 199