aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h10
-rw-r--r--include/linux/cpuidle.h22
-rw-r--r--include/linux/platform_data/spear_thermal.h26
-rw-r--r--include/linux/tboot.h1
4 files changed, 55 insertions, 4 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index f53fea61f40a..f421dd84f29d 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -372,4 +372,14 @@ static inline int acpi_nvs_for_each_region(int (*func)(__u64, __u64, void *),
372 372
373#endif /* !CONFIG_ACPI */ 373#endif /* !CONFIG_ACPI */
374 374
375#ifdef CONFIG_ACPI
376void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state,
377 u32 pm1a_ctrl, u32 pm1b_ctrl));
378
379acpi_status acpi_os_prepare_sleep(u8 sleep_state,
380 u32 pm1a_control, u32 pm1b_control);
381#else
382#define acpi_os_set_prepare_sleep(func, pm1a_ctrl, pm1b_ctrl) do { } while (0)
383#endif
384
375#endif /*_LINUX_ACPI_H*/ 385#endif /*_LINUX_ACPI_H*/
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 712abcc205ae..6c26a3da0e03 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -15,6 +15,7 @@
15#include <linux/list.h> 15#include <linux/list.h>
16#include <linux/kobject.h> 16#include <linux/kobject.h>
17#include <linux/completion.h> 17#include <linux/completion.h>
18#include <linux/hrtimer.h>
18 19
19#define CPUIDLE_STATE_MAX 8 20#define CPUIDLE_STATE_MAX 8
20#define CPUIDLE_NAME_LEN 16 21#define CPUIDLE_NAME_LEN 16
@@ -43,12 +44,15 @@ struct cpuidle_state {
43 44
44 unsigned int flags; 45 unsigned int flags;
45 unsigned int exit_latency; /* in US */ 46 unsigned int exit_latency; /* in US */
46 unsigned int power_usage; /* in mW */ 47 int power_usage; /* in mW */
47 unsigned int target_residency; /* in US */ 48 unsigned int target_residency; /* in US */
49 unsigned int disable;
48 50
49 int (*enter) (struct cpuidle_device *dev, 51 int (*enter) (struct cpuidle_device *dev,
50 struct cpuidle_driver *drv, 52 struct cpuidle_driver *drv,
51 int index); 53 int index);
54
55 int (*enter_dead) (struct cpuidle_device *dev, int index);
52}; 56};
53 57
54/* Idle State Flags */ 58/* Idle State Flags */
@@ -96,7 +100,6 @@ struct cpuidle_device {
96 struct list_head device_list; 100 struct list_head device_list;
97 struct kobject kobj; 101 struct kobject kobj;
98 struct completion kobj_unregister; 102 struct completion kobj_unregister;
99 void *governor_data;
100}; 103};
101 104
102DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices); 105DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices);
@@ -118,10 +121,12 @@ static inline int cpuidle_get_last_residency(struct cpuidle_device *dev)
118 ****************************/ 121 ****************************/
119 122
120struct cpuidle_driver { 123struct cpuidle_driver {
121 char name[CPUIDLE_NAME_LEN]; 124 const char *name;
122 struct module *owner; 125 struct module *owner;
123 126
124 unsigned int power_specified:1; 127 unsigned int power_specified:1;
128 /* set to 1 to use the core cpuidle time keeping (for all states). */
129 unsigned int en_core_tk_irqen:1;
125 struct cpuidle_state states[CPUIDLE_STATE_MAX]; 130 struct cpuidle_state states[CPUIDLE_STATE_MAX];
126 int state_count; 131 int state_count;
127 int safe_state_index; 132 int safe_state_index;
@@ -140,6 +145,11 @@ extern void cpuidle_pause_and_lock(void);
140extern void cpuidle_resume_and_unlock(void); 145extern void cpuidle_resume_and_unlock(void);
141extern int cpuidle_enable_device(struct cpuidle_device *dev); 146extern int cpuidle_enable_device(struct cpuidle_device *dev);
142extern void cpuidle_disable_device(struct cpuidle_device *dev); 147extern void cpuidle_disable_device(struct cpuidle_device *dev);
148extern int cpuidle_wrap_enter(struct cpuidle_device *dev,
149 struct cpuidle_driver *drv, int index,
150 int (*enter)(struct cpuidle_device *dev,
151 struct cpuidle_driver *drv, int index));
152extern int cpuidle_play_dead(void);
143 153
144#else 154#else
145static inline void disable_cpuidle(void) { } 155static inline void disable_cpuidle(void) { }
@@ -157,6 +167,12 @@ static inline void cpuidle_resume_and_unlock(void) { }
157static inline int cpuidle_enable_device(struct cpuidle_device *dev) 167static inline int cpuidle_enable_device(struct cpuidle_device *dev)
158{return -ENODEV; } 168{return -ENODEV; }
159static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } 169static inline void cpuidle_disable_device(struct cpuidle_device *dev) { }
170static inline int cpuidle_wrap_enter(struct cpuidle_device *dev,
171 struct cpuidle_driver *drv, int index,
172 int (*enter)(struct cpuidle_device *dev,
173 struct cpuidle_driver *drv, int index))
174{ return -ENODEV; }
175static inline int cpuidle_play_dead(void) {return -ENODEV; }
160 176
161#endif 177#endif
162 178
diff --git a/include/linux/platform_data/spear_thermal.h b/include/linux/platform_data/spear_thermal.h
new file mode 100644
index 000000000000..724f2e1cbbcb
--- /dev/null
+++ b/include/linux/platform_data/spear_thermal.h
@@ -0,0 +1,26 @@
1/*
2 * SPEAr thermal driver platform data.
3 *
4 * Copyright (C) 2011-2012 ST Microelectronics
5 * Author: Vincenzo Frascino <vincenzo.frascino@st.com>
6 *
7 * This software is licensed under the terms of the GNU General Public
8 * License version 2, as published by the Free Software Foundation, and
9 * may be copied, distributed, and modified under those terms.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 */
17#ifndef SPEAR_THERMAL_H
18#define SPEAR_THERMAL_H
19
20/* SPEAr Thermal Sensor Platform Data */
21struct spear_thermal_pdata {
22 /* flags used to enable thermal sensor */
23 unsigned int thermal_flags;
24};
25
26#endif /* SPEAR_THERMAL_H */
diff --git a/include/linux/tboot.h b/include/linux/tboot.h
index 1dba6ee55203..c75128bed5fa 100644
--- a/include/linux/tboot.h
+++ b/include/linux/tboot.h
@@ -143,7 +143,6 @@ static inline int tboot_enabled(void)
143 143
144extern void tboot_probe(void); 144extern void tboot_probe(void);
145extern void tboot_shutdown(u32 shutdown_type); 145extern void tboot_shutdown(u32 shutdown_type);
146extern void tboot_sleep(u8 sleep_state, u32 pm1a_control, u32 pm1b_control);
147extern struct acpi_table_header *tboot_get_dmar_table( 146extern struct acpi_table_header *tboot_get_dmar_table(
148 struct acpi_table_header *dmar_tbl); 147 struct acpi_table_header *dmar_tbl);
149extern int tboot_force_iommu(void); 148extern int tboot_force_iommu(void);