aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-27 19:54:49 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-04-27 19:54:49 -0400
commite4f5a3adc454745fea35f1c312e14cbeba6e0ea4 (patch)
tree7dae08f7d3466fcf158808784ec3b706e6cafec6 /include
parentae6208301e1e37a203fab817b59279a0f5d774c6 (diff)
parenta8e39c35b5d09598e129aa9b5e6f35aa3a1915d9 (diff)
Merge branch 'pm-cpuidle'
* pm-cpuidle: (51 commits) cpuidle: add maintainer entry ARM: s3c64xx: cpuidle: use init/exit common routine SH: cpuidle: use init/exit common routine cpuidle: fix comment format ARM: imx: cpuidle: use init/exit common routine ARM: davinci: cpuidle: use init/exit common routine ARM: kirkwood: cpuidle: use init/exit common routine ARM: calxeda: cpuidle: use init/exit common routine ARM: tegra: cpuidle: use init/exit common routine for tegra3 ARM: tegra: cpuidle: use init/exit common routine for tegra2 ARM: OMAP4: cpuidle: use init/exit common routine ARM: shmobile: cpuidle: use init/exit common routine ARM: tegra: cpuidle: use init/exit common routine ARM: OMAP3: cpuidle: use init/exit common routine ARM: at91: cpuidle: use init/exit common routine ARM: ux500: cpuidle: use init/exit common routine cpuidle: make a single register function for all ARM: ux500: cpuidle: replace for_each_online_cpu by for_each_possible_cpu cpuidle: remove en_core_tk_irqen flag ARM: OMAP3: remove cpuidle_wrap_enter ...
Diffstat (limited to 'include')
-rw-r--r--include/linux/clockchips.h32
-rw-r--r--include/linux/cpuidle.h23
2 files changed, 26 insertions, 29 deletions
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h
index 66346521cb65..f9fd93758333 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 */
@@ -173,7 +173,7 @@ extern int tick_receive_broadcast(void);
173#ifdef CONFIG_GENERIC_CLOCKEVENTS 173#ifdef CONFIG_GENERIC_CLOCKEVENTS
174extern void clockevents_notify(unsigned long reason, void *arg); 174extern void clockevents_notify(unsigned long reason, void *arg);
175#else 175#else
176# define clockevents_notify(reason, arg) do { } while (0) 176static inline void clockevents_notify(unsigned long reason, void *arg) {}
177#endif 177#endif
178 178
179#else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ 179#else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */
@@ -181,7 +181,7 @@ extern void clockevents_notify(unsigned long reason, void *arg);
181static inline void clockevents_suspend(void) {} 181static inline void clockevents_suspend(void) {}
182static inline void clockevents_resume(void) {} 182static inline void clockevents_resume(void) {}
183 183
184#define clockevents_notify(reason, arg) do { } while (0) 184static inline void clockevents_notify(unsigned long reason, void *arg) {}
185 185
186#endif 186#endif
187 187
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 480c14dc1ddd..3c86faa59798 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -57,6 +57,7 @@ struct cpuidle_state {
57/* Idle State Flags */ 57/* Idle State Flags */
58#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */ 58#define CPUIDLE_FLAG_TIME_VALID (0x01) /* is residency time measurable? */
59#define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */ 59#define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cpus */
60#define CPUIDLE_FLAG_TIMER_STOP (0x04) /* timer is stopped on this state */
60 61
61#define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000) 62#define CPUIDLE_DRIVER_FLAGS_MASK (0xFFFF0000)
62 63
@@ -104,8 +105,8 @@ struct cpuidle_driver {
104 struct module *owner; 105 struct module *owner;
105 int refcnt; 106 int refcnt;
106 107
107 /* set to 1 to use the core cpuidle time keeping (for all states). */ 108 /* used by the cpuidle framework to setup the broadcast timer */
108 unsigned int en_core_tk_irqen:1; 109 unsigned int bctimer:1;
109 /* states array must be ordered in decreasing power consumption */ 110 /* states array must be ordered in decreasing power consumption */
110 struct cpuidle_state states[CPUIDLE_STATE_MAX]; 111 struct cpuidle_state states[CPUIDLE_STATE_MAX];
111 int state_count; 112 int state_count;
@@ -122,17 +123,15 @@ extern void cpuidle_driver_unref(void);
122extern void cpuidle_unregister_driver(struct cpuidle_driver *drv); 123extern void cpuidle_unregister_driver(struct cpuidle_driver *drv);
123extern int cpuidle_register_device(struct cpuidle_device *dev); 124extern int cpuidle_register_device(struct cpuidle_device *dev);
124extern void cpuidle_unregister_device(struct cpuidle_device *dev); 125extern void cpuidle_unregister_device(struct cpuidle_device *dev);
125 126extern int cpuidle_register(struct cpuidle_driver *drv,
127 const struct cpumask *const coupled_cpus);
128extern void cpuidle_unregister(struct cpuidle_driver *drv);
126extern void cpuidle_pause_and_lock(void); 129extern void cpuidle_pause_and_lock(void);
127extern void cpuidle_resume_and_unlock(void); 130extern void cpuidle_resume_and_unlock(void);
128extern void cpuidle_pause(void); 131extern void cpuidle_pause(void);
129extern void cpuidle_resume(void); 132extern void cpuidle_resume(void);
130extern int cpuidle_enable_device(struct cpuidle_device *dev); 133extern int cpuidle_enable_device(struct cpuidle_device *dev);
131extern void cpuidle_disable_device(struct cpuidle_device *dev); 134extern void cpuidle_disable_device(struct cpuidle_device *dev);
132extern int cpuidle_wrap_enter(struct cpuidle_device *dev,
133 struct cpuidle_driver *drv, int index,
134 int (*enter)(struct cpuidle_device *dev,
135 struct cpuidle_driver *drv, int index));
136extern int cpuidle_play_dead(void); 135extern int cpuidle_play_dead(void);
137 136
138extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev); 137extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev);
@@ -151,7 +150,10 @@ static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }
151static inline int cpuidle_register_device(struct cpuidle_device *dev) 150static inline int cpuidle_register_device(struct cpuidle_device *dev)
152{return -ENODEV; } 151{return -ENODEV; }
153static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { } 152static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { }
154 153static inline int cpuidle_register(struct cpuidle_driver *drv,
154 const struct cpumask *const coupled_cpus)
155{return -ENODEV; }
156static inline void cpuidle_unregister(struct cpuidle_driver *drv) { }
155static inline void cpuidle_pause_and_lock(void) { } 157static inline void cpuidle_pause_and_lock(void) { }
156static inline void cpuidle_resume_and_unlock(void) { } 158static inline void cpuidle_resume_and_unlock(void) { }
157static inline void cpuidle_pause(void) { } 159static inline void cpuidle_pause(void) { }
@@ -159,11 +161,6 @@ static inline void cpuidle_resume(void) { }
159static inline int cpuidle_enable_device(struct cpuidle_device *dev) 161static inline int cpuidle_enable_device(struct cpuidle_device *dev)
160{return -ENODEV; } 162{return -ENODEV; }
161static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } 163static inline void cpuidle_disable_device(struct cpuidle_device *dev) { }
162static inline int cpuidle_wrap_enter(struct cpuidle_device *dev,
163 struct cpuidle_driver *drv, int index,
164 int (*enter)(struct cpuidle_device *dev,
165 struct cpuidle_driver *drv, int index))
166{ return -ENODEV; }
167static inline int cpuidle_play_dead(void) {return -ENODEV; } 164static inline int cpuidle_play_dead(void) {return -ENODEV; }
168#endif 165#endif
169 166