aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/clockchips.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-05-18 17:33:41 -0400
committerThomas Gleixner <tglx@linutronix.de>2011-05-19 08:24:15 -0400
commit57f0fcbe1dea8a36c9d1673086326059991c5f81 (patch)
treec56c00307052034a64d2577819fdf21271446ebe /include/linux/clockchips.h
parent847b2f42be203f3cff7f243fdd3ee50c1e06c882 (diff)
clockevents: Provide combined configure and register function
All clockevent devices have the same open coded initialization functions. Provide an interface which does all necessary initialization in the core code. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: John Stultz <john.stultz@linaro.org> Reviewed-by: Ingo Molnar <mingo@elte.hu> Link: http://lkml.kernel.org/r/%3C20110518210136.331975870%40linutronix.de%3E
Diffstat (limited to 'include/linux/clockchips.h')
-rw-r--r--include/linux/clockchips.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 9466eebc8e19..80acc79e0dc5 100644
--- a/include/linux/clockchips.h
+++ b/include/linux/clockchips.h
@@ -69,6 +69,8 @@ enum clock_event_nofitiers {
69 * @retries: number of forced programming retries 69 * @retries: number of forced programming retries
70 * @set_mode: set mode function 70 * @set_mode: set mode function
71 * @broadcast: function to broadcast events 71 * @broadcast: function to broadcast events
72 * @min_delta_ticks: minimum delta value in ticks stored for reconfiguration
73 * @max_delta_ticks: maximum delta value in ticks stored for reconfiguration
72 * @name: ptr to clock event name 74 * @name: ptr to clock event name
73 * @rating: variable to rate clock event devices 75 * @rating: variable to rate clock event devices
74 * @irq: IRQ number (only for non CPU local devices) 76 * @irq: IRQ number (only for non CPU local devices)
@@ -91,6 +93,9 @@ struct clock_event_device {
91 void (*broadcast)(const struct cpumask *mask); 93 void (*broadcast)(const struct cpumask *mask);
92 void (*set_mode)(enum clock_event_mode mode, 94 void (*set_mode)(enum clock_event_mode mode,
93 struct clock_event_device *); 95 struct clock_event_device *);
96 unsigned long min_delta_ticks;
97 unsigned long max_delta_ticks;
98
94 const char *name; 99 const char *name;
95 int rating; 100 int rating;
96 int irq; 101 int irq;
@@ -123,6 +128,10 @@ extern u64 clockevent_delta2ns(unsigned long latch,
123 struct clock_event_device *evt); 128 struct clock_event_device *evt);
124extern void clockevents_register_device(struct clock_event_device *dev); 129extern void clockevents_register_device(struct clock_event_device *dev);
125 130
131extern void clockevents_config_and_register(struct clock_event_device *dev,
132 u32 freq, unsigned long min_delta,
133 unsigned long max_delta);
134
126extern void clockevents_exchange_device(struct clock_event_device *old, 135extern void clockevents_exchange_device(struct clock_event_device *old,
127 struct clock_event_device *new); 136 struct clock_event_device *new);
128extern void clockevents_set_mode(struct clock_event_device *dev, 137extern void clockevents_set_mode(struct clock_event_device *dev,