diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/acpi/acconfig.h | 248 | ||||
| -rw-r--r-- | include/acpi/acexcep.h | 7 | ||||
| -rw-r--r-- | include/acpi/acnames.h | 12 | ||||
| -rw-r--r-- | include/acpi/acpi_bus.h | 7 | ||||
| -rw-r--r-- | include/acpi/acpiosxf.h | 13 | ||||
| -rw-r--r-- | include/acpi/acpixf.h | 229 | ||||
| -rw-r--r-- | include/acpi/actbl.h | 7 | ||||
| -rw-r--r-- | include/acpi/actypes.h | 22 | ||||
| -rw-r--r-- | include/linux/acpi.h | 10 | ||||
| -rw-r--r-- | include/linux/cpuidle.h | 22 | ||||
| -rw-r--r-- | include/linux/platform_data/spear_thermal.h | 26 | ||||
| -rw-r--r-- | include/linux/tboot.h | 1 |
12 files changed, 515 insertions, 89 deletions
diff --git a/include/acpi/acconfig.h b/include/acpi/acconfig.h new file mode 100644 index 000000000000..03f14856bd09 --- /dev/null +++ b/include/acpi/acconfig.h | |||
| @@ -0,0 +1,248 @@ | |||
| 1 | /****************************************************************************** | ||
| 2 | * | ||
| 3 | * Name: acconfig.h - Global configuration constants | ||
| 4 | * | ||
| 5 | *****************************************************************************/ | ||
| 6 | |||
| 7 | /* | ||
| 8 | * Copyright (C) 2000 - 2012, Intel Corp. | ||
| 9 | * All rights reserved. | ||
| 10 | * | ||
| 11 | * Redistribution and use in source and binary forms, with or without | ||
| 12 | * modification, are permitted provided that the following conditions | ||
| 13 | * are met: | ||
| 14 | * 1. Redistributions of source code must retain the above copyright | ||
| 15 | * notice, this list of conditions, and the following disclaimer, | ||
| 16 | * without modification. | ||
| 17 | * 2. Redistributions in binary form must reproduce at minimum a disclaimer | ||
| 18 | * substantially similar to the "NO WARRANTY" disclaimer below | ||
| 19 | * ("Disclaimer") and any redistribution must be conditioned upon | ||
| 20 | * including a substantially similar Disclaimer requirement for further | ||
| 21 | * binary redistribution. | ||
| 22 | * 3. Neither the names of the above-listed copyright holders nor the names | ||
| 23 | * of any contributors may be used to endorse or promote products derived | ||
| 24 | * from this software without specific prior written permission. | ||
| 25 | * | ||
| 26 | * Alternatively, this software may be distributed under the terms of the | ||
| 27 | * GNU General Public License ("GPL") version 2 as published by the Free | ||
| 28 | * Software Foundation. | ||
| 29 | * | ||
| 30 | * NO WARRANTY | ||
| 31 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 32 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 33 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR | ||
| 34 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
| 35 | * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 36 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 37 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 38 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 39 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING | ||
| 40 | * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| 41 | * POSSIBILITY OF SUCH DAMAGES. | ||
| 42 | */ | ||
| 43 | |||
| 44 | #ifndef _ACCONFIG_H | ||
| 45 | #define _ACCONFIG_H | ||
| 46 | |||
| 47 | /****************************************************************************** | ||
| 48 | * | ||
| 49 | * Configuration options | ||
| 50 | * | ||
| 51 | *****************************************************************************/ | ||
| 52 | |||
| 53 | /* | ||
| 54 | * ACPI_DEBUG_OUTPUT - This switch enables all the debug facilities of the | ||
| 55 | * ACPI subsystem. This includes the DEBUG_PRINT output | ||
| 56 | * statements. When disabled, all DEBUG_PRINT | ||
| 57 | * statements are compiled out. | ||
| 58 | * | ||
| 59 | * ACPI_APPLICATION - Use this switch if the subsystem is going to be run | ||
| 60 | * at the application level. | ||
| 61 | * | ||
| 62 | */ | ||
| 63 | |||
| 64 | /* | ||
| 65 | * OS name, used for the _OS object. The _OS object is essentially obsolete, | ||
| 66 | * but there is a large base of ASL/AML code in existing machines that check | ||
| 67 | * for the string below. The use of this string usually guarantees that | ||
| 68 | * the ASL will execute down the most tested code path. Also, there is some | ||
| 69 | * code that will not execute the _OSI method unless _OS matches the string | ||
| 70 | * below. Therefore, change this string at your own risk. | ||
| 71 | */ | ||
| 72 | #define ACPI_OS_NAME "Microsoft Windows NT" | ||
| 73 | |||
| 74 | /* Maximum objects in the various object caches */ | ||
| 75 | |||
| 76 | #define ACPI_MAX_STATE_CACHE_DEPTH 96 /* State objects */ | ||
| 77 | #define ACPI_MAX_PARSE_CACHE_DEPTH 96 /* Parse tree objects */ | ||
| 78 | #define ACPI_MAX_EXTPARSE_CACHE_DEPTH 96 /* Parse tree objects */ | ||
| 79 | #define ACPI_MAX_OBJECT_CACHE_DEPTH 96 /* Interpreter operand objects */ | ||
| 80 | #define ACPI_MAX_NAMESPACE_CACHE_DEPTH 96 /* Namespace objects */ | ||
| 81 | |||
| 82 | /* | ||
| 83 | * Should the subsystem abort the loading of an ACPI table if the | ||
| 84 | * table checksum is incorrect? | ||
| 85 | */ | ||
| 86 | #define ACPI_CHECKSUM_ABORT FALSE | ||
| 87 | |||
| 88 | /* | ||
| 89 | * Generate a version of ACPICA that only supports "reduced hardware" | ||
| 90 | * platforms (as defined in ACPI 5.0). Set to TRUE to generate a specialized | ||
| 91 | * version of ACPICA that ONLY supports the ACPI 5.0 "reduced hardware" | ||
| 92 | * model. In other words, no ACPI hardware is supported. | ||
| 93 | * | ||
| 94 | * If TRUE, this means no support for the following: | ||
| 95 | * PM Event and Control registers | ||
| 96 | * SCI interrupt (and handler) | ||
| 97 | * Fixed Events | ||
| 98 | * General Purpose Events (GPEs) | ||
| 99 | * Global Lock | ||
| 100 | * ACPI PM timer | ||
| 101 | * FACS table (Waking vectors and Global Lock) | ||
| 102 | */ | ||
| 103 | #define ACPI_REDUCED_HARDWARE FALSE | ||
| 104 | |||
| 105 | /****************************************************************************** | ||
| 106 | * | ||
| 107 | * Subsystem Constants | ||
| 108 | * | ||
| 109 | *****************************************************************************/ | ||
| 110 | |||
| 111 | /* Version of ACPI supported */ | ||
| 112 | |||
| 113 | #define ACPI_CA_SUPPORT_LEVEL 5 | ||
| 114 | |||
| 115 | /* Maximum count for a semaphore object */ | ||
| 116 | |||
| 117 | #define ACPI_MAX_SEMAPHORE_COUNT 256 | ||
| 118 | |||
| 119 | /* Maximum object reference count (detects object deletion issues) */ | ||
| 120 | |||
| 121 | #define ACPI_MAX_REFERENCE_COUNT 0x1000 | ||
| 122 | |||
| 123 | /* Default page size for use in mapping memory for operation regions */ | ||
| 124 | |||
| 125 | #define ACPI_DEFAULT_PAGE_SIZE 4096 /* Must be power of 2 */ | ||
| 126 | |||
| 127 | /* owner_id tracking. 8 entries allows for 255 owner_ids */ | ||
| 128 | |||
| 129 | #define ACPI_NUM_OWNERID_MASKS 8 | ||
| 130 | |||
| 131 | /* Size of the root table array is increased by this increment */ | ||
| 132 | |||
| 133 | #define ACPI_ROOT_TABLE_SIZE_INCREMENT 4 | ||
| 134 | |||
| 135 | /* Maximum number of While() loop iterations before forced abort */ | ||
| 136 | |||
| 137 | #define ACPI_MAX_LOOP_ITERATIONS 0xFFFF | ||
| 138 | |||
| 139 | /* Maximum sleep allowed via Sleep() operator */ | ||
| 140 | |||
| 141 | #define ACPI_MAX_SLEEP 2000 /* Two seconds */ | ||
| 142 | |||
| 143 | /* Address Range lists are per-space_id (Memory and I/O only) */ | ||
| 144 | |||
| 145 | #define ACPI_ADDRESS_RANGE_MAX 2 | ||
| 146 | |||
| 147 | /****************************************************************************** | ||
| 148 | * | ||
| 149 | * ACPI Specification constants (Do not change unless the specification changes) | ||
| 150 | * | ||
| 151 | *****************************************************************************/ | ||
| 152 | |||
| 153 | /* Number of distinct GPE register blocks and register width */ | ||
| 154 | |||
| 155 | #define ACPI_MAX_GPE_BLOCKS 2 | ||
| 156 | #define ACPI_GPE_REGISTER_WIDTH 8 | ||
| 157 | |||
| 158 | /* Method info (in WALK_STATE), containing local variables and argumetns */ | ||
| 159 | |||
| 160 | #define ACPI_METHOD_NUM_LOCALS 8 | ||
| 161 | #define ACPI_METHOD_MAX_LOCAL 7 | ||
| 162 | |||
| 163 | #define ACPI_METHOD_NUM_ARGS 7 | ||
| 164 | #define ACPI_METHOD_MAX_ARG 6 | ||
| 165 | |||
| 166 | /* Length of _HID, _UID, _CID, and UUID values */ | ||
| 167 | |||
| 168 | #define ACPI_DEVICE_ID_LENGTH 0x09 | ||
| 169 | #define ACPI_MAX_CID_LENGTH 48 | ||
| 170 | #define ACPI_UUID_LENGTH 16 | ||
| 171 | |||
| 172 | /* | ||
| 173 | * Operand Stack (in WALK_STATE), Must be large enough to contain METHOD_MAX_ARG | ||
| 174 | */ | ||
| 175 | #define ACPI_OBJ_NUM_OPERANDS 8 | ||
| 176 | #define ACPI_OBJ_MAX_OPERAND 7 | ||
| 177 | |||
| 178 | /* Number of elements in the Result Stack frame, can be an arbitrary value */ | ||
| 179 | |||
| 180 | #define ACPI_RESULTS_FRAME_OBJ_NUM 8 | ||
| 181 | |||
| 182 | /* | ||
| 183 | * Maximal number of elements the Result Stack can contain, | ||
| 184 | * it may be an arbitray value not exceeding the types of | ||
| 185 | * result_size and result_count (now u8). | ||
| 186 | */ | ||
| 187 | #define ACPI_RESULTS_OBJ_NUM_MAX 255 | ||
| 188 | |||
| 189 | /* Names within the namespace are 4 bytes long */ | ||
| 190 | |||
| 191 | #define ACPI_NAME_SIZE 4 | ||
| 192 | #define ACPI_PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 char for separator */ | ||
| 193 | #define ACPI_PATH_SEPARATOR '.' | ||
| 194 | |||
| 195 | /* Sizes for ACPI table headers */ | ||
| 196 | |||
| 197 | #define ACPI_OEM_ID_SIZE 6 | ||
| 198 | #define ACPI_OEM_TABLE_ID_SIZE 8 | ||
| 199 | |||
| 200 | /* Constants used in searching for the RSDP in low memory */ | ||
| 201 | |||
| 202 | #define ACPI_EBDA_PTR_LOCATION 0x0000040E /* Physical Address */ | ||
| 203 | #define ACPI_EBDA_PTR_LENGTH 2 | ||
| 204 | #define ACPI_EBDA_WINDOW_SIZE 1024 | ||
| 205 | #define ACPI_HI_RSDP_WINDOW_BASE 0x000E0000 /* Physical Address */ | ||
| 206 | #define ACPI_HI_RSDP_WINDOW_SIZE 0x00020000 | ||
| 207 | #define ACPI_RSDP_SCAN_STEP 16 | ||
| 208 | |||
| 209 | /* Operation regions */ | ||
| 210 | |||
| 211 | #define ACPI_USER_REGION_BEGIN 0x80 | ||
| 212 | |||
| 213 | /* Maximum space_ids for Operation Regions */ | ||
| 214 | |||
| 215 | #define ACPI_MAX_ADDRESS_SPACE 255 | ||
| 216 | |||
| 217 | /* Array sizes. Used for range checking also */ | ||
| 218 | |||
| 219 | #define ACPI_MAX_MATCH_OPCODE 5 | ||
| 220 | |||
| 221 | /* RSDP checksums */ | ||
| 222 | |||
| 223 | #define ACPI_RSDP_CHECKSUM_LENGTH 20 | ||
| 224 | #define ACPI_RSDP_XCHECKSUM_LENGTH 36 | ||
| 225 | |||
| 226 | /* SMBus, GSBus and IPMI bidirectional buffer size */ | ||
| 227 | |||
| 228 | #define ACPI_SMBUS_BUFFER_SIZE 34 | ||
| 229 | #define ACPI_GSBUS_BUFFER_SIZE 34 | ||
| 230 | #define ACPI_IPMI_BUFFER_SIZE 66 | ||
| 231 | |||
| 232 | /* _sx_d and _sx_w control methods */ | ||
| 233 | |||
| 234 | #define ACPI_NUM_sx_d_METHODS 4 | ||
| 235 | #define ACPI_NUM_sx_w_METHODS 5 | ||
| 236 | |||
| 237 | /****************************************************************************** | ||
| 238 | * | ||
| 239 | * ACPI AML Debugger | ||
| 240 | * | ||
| 241 | *****************************************************************************/ | ||
| 242 | |||
| 243 | #define ACPI_DEBUGGER_MAX_ARGS 8 /* Must be max method args + 1 */ | ||
| 244 | |||
| 245 | #define ACPI_DEBUGGER_COMMAND_PROMPT '-' | ||
| 246 | #define ACPI_DEBUGGER_EXECUTE_PROMPT '%' | ||
| 247 | |||
| 248 | #endif /* _ACCONFIG_H */ | ||
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 5b6c391efc8e..92d6e1d701ff 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h | |||
| @@ -57,6 +57,7 @@ | |||
| 57 | #define ACPI_SUCCESS(a) (!(a)) | 57 | #define ACPI_SUCCESS(a) (!(a)) |
| 58 | #define ACPI_FAILURE(a) (a) | 58 | #define ACPI_FAILURE(a) (a) |
| 59 | 59 | ||
| 60 | #define ACPI_SKIP(a) (a == AE_CTRL_SKIP) | ||
| 60 | #define AE_OK (acpi_status) 0x0000 | 61 | #define AE_OK (acpi_status) 0x0000 |
| 61 | 62 | ||
| 62 | /* | 63 | /* |
| @@ -89,8 +90,9 @@ | |||
| 89 | #define AE_SAME_HANDLER (acpi_status) (0x0019 | AE_CODE_ENVIRONMENTAL) | 90 | #define AE_SAME_HANDLER (acpi_status) (0x0019 | AE_CODE_ENVIRONMENTAL) |
| 90 | #define AE_NO_HANDLER (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL) | 91 | #define AE_NO_HANDLER (acpi_status) (0x001A | AE_CODE_ENVIRONMENTAL) |
| 91 | #define AE_OWNER_ID_LIMIT (acpi_status) (0x001B | AE_CODE_ENVIRONMENTAL) | 92 | #define AE_OWNER_ID_LIMIT (acpi_status) (0x001B | AE_CODE_ENVIRONMENTAL) |
| 93 | #define AE_NOT_CONFIGURED (acpi_status) (0x001C | AE_CODE_ENVIRONMENTAL) | ||
| 92 | 94 | ||
| 93 | #define AE_CODE_ENV_MAX 0x001B | 95 | #define AE_CODE_ENV_MAX 0x001C |
| 94 | 96 | ||
| 95 | /* | 97 | /* |
| 96 | * Programmer exceptions | 98 | * Programmer exceptions |
| @@ -213,7 +215,8 @@ char const *acpi_gbl_exception_names_env[] = { | |||
| 213 | "AE_ABORT_METHOD", | 215 | "AE_ABORT_METHOD", |
| 214 | "AE_SAME_HANDLER", | 216 | "AE_SAME_HANDLER", |
| 215 | "AE_NO_HANDLER", | 217 | "AE_NO_HANDLER", |
| 216 | "AE_OWNER_ID_LIMIT" | 218 | "AE_OWNER_ID_LIMIT", |
| 219 | "AE_NOT_CONFIGURED" | ||
| 217 | }; | 220 | }; |
| 218 | 221 | ||
| 219 | char const *acpi_gbl_exception_names_pgm[] = { | 222 | char const *acpi_gbl_exception_names_pgm[] = { |
diff --git a/include/acpi/acnames.h b/include/acpi/acnames.h index 5b5af0d30a97..38f508816e4a 100644 --- a/include/acpi/acnames.h +++ b/include/acpi/acnames.h | |||
| @@ -46,6 +46,7 @@ | |||
| 46 | 46 | ||
| 47 | /* Method names - these methods can appear anywhere in the namespace */ | 47 | /* Method names - these methods can appear anywhere in the namespace */ |
| 48 | 48 | ||
| 49 | #define METHOD_NAME__SB_ "_SB_" | ||
| 49 | #define METHOD_NAME__HID "_HID" | 50 | #define METHOD_NAME__HID "_HID" |
| 50 | #define METHOD_NAME__CID "_CID" | 51 | #define METHOD_NAME__CID "_CID" |
| 51 | #define METHOD_NAME__UID "_UID" | 52 | #define METHOD_NAME__UID "_UID" |
| @@ -64,11 +65,11 @@ | |||
| 64 | 65 | ||
| 65 | /* Method names - these methods must appear at the namespace root */ | 66 | /* Method names - these methods must appear at the namespace root */ |
| 66 | 67 | ||
| 67 | #define METHOD_NAME__BFS "\\_BFS" | 68 | #define METHOD_PATHNAME__BFS "\\_BFS" |
| 68 | #define METHOD_NAME__GTS "\\_GTS" | 69 | #define METHOD_PATHNAME__GTS "\\_GTS" |
| 69 | #define METHOD_NAME__PTS "\\_PTS" | 70 | #define METHOD_PATHNAME__PTS "\\_PTS" |
| 70 | #define METHOD_NAME__SST "\\_SI._SST" | 71 | #define METHOD_PATHNAME__SST "\\_SI._SST" |
| 71 | #define METHOD_NAME__WAK "\\_WAK" | 72 | #define METHOD_PATHNAME__WAK "\\_WAK" |
| 72 | 73 | ||
| 73 | /* Definitions of the predefined namespace names */ | 74 | /* Definitions of the predefined namespace names */ |
| 74 | 75 | ||
| @@ -79,6 +80,5 @@ | |||
| 79 | #define ACPI_PREFIX_LOWER (u32) 0x69706361 /* "acpi" */ | 80 | #define ACPI_PREFIX_LOWER (u32) 0x69706361 /* "acpi" */ |
| 80 | 81 | ||
| 81 | #define ACPI_NS_ROOT_PATH "\\" | 82 | #define ACPI_NS_ROOT_PATH "\\" |
| 82 | #define ACPI_NS_SYSTEM_BUS "_SB_" | ||
| 83 | 83 | ||
| 84 | #endif /* __ACNAMES_H__ */ | 84 | #endif /* __ACNAMES_H__ */ |
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 6cd5b6403a7b..f1c8ca60e824 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
| @@ -323,6 +323,8 @@ int acpi_bus_set_power(acpi_handle handle, int state); | |||
| 323 | int acpi_bus_update_power(acpi_handle handle, int *state_p); | 323 | int acpi_bus_update_power(acpi_handle handle, int *state_p); |
| 324 | bool acpi_bus_power_manageable(acpi_handle handle); | 324 | bool acpi_bus_power_manageable(acpi_handle handle); |
| 325 | bool acpi_bus_can_wakeup(acpi_handle handle); | 325 | bool acpi_bus_can_wakeup(acpi_handle handle); |
| 326 | int acpi_power_resource_register_device(struct device *dev, acpi_handle handle); | ||
| 327 | void acpi_power_resource_unregister_device(struct device *dev, acpi_handle handle); | ||
| 326 | #ifdef CONFIG_ACPI_PROC_EVENT | 328 | #ifdef CONFIG_ACPI_PROC_EVENT |
| 327 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data); | 329 | int acpi_bus_generate_proc_event(struct acpi_device *device, u8 type, int data); |
| 328 | int acpi_bus_generate_proc_event4(const char *class, const char *bid, u8 type, int data); | 330 | int acpi_bus_generate_proc_event4(const char *class, const char *bid, u8 type, int data); |
| @@ -392,8 +394,13 @@ static inline int acpi_pm_device_sleep_state(struct device *d, int *p) | |||
| 392 | #endif | 394 | #endif |
| 393 | 395 | ||
| 394 | #ifdef CONFIG_PM_SLEEP | 396 | #ifdef CONFIG_PM_SLEEP |
| 397 | int acpi_pm_device_run_wake(struct device *, bool); | ||
| 395 | int acpi_pm_device_sleep_wake(struct device *, bool); | 398 | int acpi_pm_device_sleep_wake(struct device *, bool); |
| 396 | #else | 399 | #else |
| 400 | static inline int acpi_pm_device_run_wake(struct device *dev, bool enable) | ||
| 401 | { | ||
| 402 | return -ENODEV; | ||
| 403 | } | ||
| 397 | static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) | 404 | static inline int acpi_pm_device_sleep_wake(struct device *dev, bool enable) |
| 398 | { | 405 | { |
| 399 | return -ENODEV; | 406 | return -ENODEV; |
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h index 7c9aebe8a7aa..21a5548c6686 100644 --- a/include/acpi/acpiosxf.h +++ b/include/acpi/acpiosxf.h | |||
| @@ -95,6 +95,11 @@ acpi_status | |||
| 95 | acpi_os_table_override(struct acpi_table_header *existing_table, | 95 | acpi_os_table_override(struct acpi_table_header *existing_table, |
| 96 | struct acpi_table_header **new_table); | 96 | struct acpi_table_header **new_table); |
| 97 | 97 | ||
| 98 | acpi_status | ||
| 99 | acpi_os_physical_table_override(struct acpi_table_header *existing_table, | ||
| 100 | acpi_physical_address * new_address, | ||
| 101 | u32 *new_table_length); | ||
| 102 | |||
| 98 | /* | 103 | /* |
| 99 | * Spinlock primitives | 104 | * Spinlock primitives |
| 100 | */ | 105 | */ |
| @@ -217,14 +222,10 @@ acpi_status acpi_os_write_port(acpi_io_address address, u32 value, u32 width); | |||
| 217 | * Platform and hardware-independent physical memory interfaces | 222 | * Platform and hardware-independent physical memory interfaces |
| 218 | */ | 223 | */ |
| 219 | acpi_status | 224 | acpi_status |
| 220 | acpi_os_read_memory(acpi_physical_address address, u32 * value, u32 width); | 225 | acpi_os_read_memory(acpi_physical_address address, u64 *value, u32 width); |
| 221 | acpi_status | ||
| 222 | acpi_os_read_memory64(acpi_physical_address address, u64 *value, u32 width); | ||
| 223 | 226 | ||
| 224 | acpi_status | 227 | acpi_status |
| 225 | acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width); | 228 | acpi_os_write_memory(acpi_physical_address address, u64 value, u32 width); |
| 226 | acpi_status | ||
| 227 | acpi_os_write_memory64(acpi_physical_address address, u64 value, u32 width); | ||
| 228 | 229 | ||
| 229 | /* | 230 | /* |
| 230 | * Platform and hardware-independent PCI configuration space access | 231 | * Platform and hardware-independent PCI configuration space access |
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index a28da35ba45e..982110134672 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h | |||
| @@ -47,8 +47,9 @@ | |||
| 47 | 47 | ||
| 48 | /* Current ACPICA subsystem version in YYYYMMDD format */ | 48 | /* Current ACPICA subsystem version in YYYYMMDD format */ |
| 49 | 49 | ||
| 50 | #define ACPI_CA_VERSION 0x20120111 | 50 | #define ACPI_CA_VERSION 0x20120320 |
| 51 | 51 | ||
| 52 | #include "acconfig.h" | ||
| 52 | #include "actypes.h" | 53 | #include "actypes.h" |
| 53 | #include "actbl.h" | 54 | #include "actbl.h" |
| 54 | 55 | ||
| @@ -71,6 +72,33 @@ extern u8 acpi_gbl_copy_dsdt_locally; | |||
| 71 | extern u8 acpi_gbl_truncate_io_addresses; | 72 | extern u8 acpi_gbl_truncate_io_addresses; |
| 72 | extern u8 acpi_gbl_disable_auto_repair; | 73 | extern u8 acpi_gbl_disable_auto_repair; |
| 73 | 74 | ||
| 75 | /* | ||
| 76 | * Hardware-reduced prototypes. All interfaces that use these macros will | ||
| 77 | * be configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag | ||
| 78 | * is set to TRUE. | ||
| 79 | */ | ||
| 80 | #if (!ACPI_REDUCED_HARDWARE) | ||
| 81 | #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \ | ||
| 82 | prototype; | ||
| 83 | |||
| 84 | #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ | ||
| 85 | prototype; | ||
| 86 | |||
| 87 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ | ||
| 88 | prototype; | ||
| 89 | |||
| 90 | #else | ||
| 91 | #define ACPI_HW_DEPENDENT_RETURN_STATUS(prototype) \ | ||
| 92 | static ACPI_INLINE prototype {return(AE_NOT_CONFIGURED);} | ||
| 93 | |||
| 94 | #define ACPI_HW_DEPENDENT_RETURN_OK(prototype) \ | ||
| 95 | static ACPI_INLINE prototype {return(AE_OK);} | ||
| 96 | |||
| 97 | #define ACPI_HW_DEPENDENT_RETURN_VOID(prototype) \ | ||
| 98 | static ACPI_INLINE prototype {} | ||
| 99 | |||
| 100 | #endif /* !ACPI_REDUCED_HARDWARE */ | ||
| 101 | |||
| 74 | extern u32 acpi_current_gpe_count; | 102 | extern u32 acpi_current_gpe_count; |
| 75 | extern struct acpi_table_fadt acpi_gbl_FADT; | 103 | extern struct acpi_table_fadt acpi_gbl_FADT; |
| 76 | extern u8 acpi_gbl_system_awake_and_running; | 104 | extern u8 acpi_gbl_system_awake_and_running; |
| @@ -96,9 +124,8 @@ acpi_status acpi_terminate(void); | |||
| 96 | acpi_status acpi_subsystem_status(void); | 124 | acpi_status acpi_subsystem_status(void); |
| 97 | #endif | 125 | #endif |
| 98 | 126 | ||
| 99 | acpi_status acpi_enable(void); | 127 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable(void)) |
| 100 | 128 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable(void)) | |
| 101 | acpi_status acpi_disable(void); | ||
| 102 | 129 | ||
| 103 | #ifdef ACPI_FUTURE_USAGE | 130 | #ifdef ACPI_FUTURE_USAGE |
| 104 | acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer); | 131 | acpi_status acpi_get_system_info(struct acpi_buffer *ret_buffer); |
| @@ -235,17 +262,34 @@ acpi_status acpi_get_parent(acpi_handle object, acpi_handle * out_handle); | |||
| 235 | acpi_status | 262 | acpi_status |
| 236 | acpi_install_initialization_handler(acpi_init_handler handler, u32 function); | 263 | acpi_install_initialization_handler(acpi_init_handler handler, u32 function); |
| 237 | 264 | ||
| 238 | acpi_status | 265 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 239 | acpi_install_global_event_handler(ACPI_GBL_EVENT_HANDLER handler, | 266 | acpi_install_global_event_handler |
| 240 | void *context); | 267 | (ACPI_GBL_EVENT_HANDLER handler, void *context)) |
| 241 | 268 | ||
| 242 | acpi_status | 269 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 243 | acpi_install_fixed_event_handler(u32 acpi_event, | 270 | acpi_install_fixed_event_handler(u32 |
| 244 | acpi_event_handler handler, void *context); | 271 | acpi_event, |
| 245 | 272 | acpi_event_handler | |
| 246 | acpi_status | 273 | handler, |
| 247 | acpi_remove_fixed_event_handler(u32 acpi_event, acpi_event_handler handler); | 274 | void |
| 248 | 275 | *context)) | |
| 276 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
| 277 | acpi_remove_fixed_event_handler(u32 acpi_event, | ||
| 278 | acpi_event_handler | ||
| 279 | handler)) | ||
| 280 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
| 281 | acpi_install_gpe_handler(acpi_handle | ||
| 282 | gpe_device, | ||
| 283 | u32 gpe_number, | ||
| 284 | u32 type, | ||
| 285 | acpi_gpe_handler | ||
| 286 | address, | ||
| 287 | void *context)) | ||
| 288 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
| 289 | acpi_remove_gpe_handler(acpi_handle gpe_device, | ||
| 290 | u32 gpe_number, | ||
| 291 | acpi_gpe_handler | ||
| 292 | address)) | ||
| 249 | acpi_status | 293 | acpi_status |
| 250 | acpi_install_notify_handler(acpi_handle device, | 294 | acpi_install_notify_handler(acpi_handle device, |
| 251 | u32 handler_type, | 295 | u32 handler_type, |
| @@ -266,15 +310,6 @@ acpi_remove_address_space_handler(acpi_handle device, | |||
| 266 | acpi_adr_space_type space_id, | 310 | acpi_adr_space_type space_id, |
| 267 | acpi_adr_space_handler handler); | 311 | acpi_adr_space_handler handler); |
| 268 | 312 | ||
| 269 | acpi_status | ||
| 270 | acpi_install_gpe_handler(acpi_handle gpe_device, | ||
| 271 | u32 gpe_number, | ||
| 272 | u32 type, acpi_gpe_handler address, void *context); | ||
| 273 | |||
| 274 | acpi_status | ||
| 275 | acpi_remove_gpe_handler(acpi_handle gpe_device, | ||
| 276 | u32 gpe_number, acpi_gpe_handler address); | ||
| 277 | |||
| 278 | #ifdef ACPI_FUTURE_USAGE | 313 | #ifdef ACPI_FUTURE_USAGE |
| 279 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); | 314 | acpi_status acpi_install_exception_handler(acpi_exception_handler handler); |
| 280 | #endif | 315 | #endif |
| @@ -284,9 +319,11 @@ acpi_status acpi_install_interface_handler(acpi_interface_handler handler); | |||
| 284 | /* | 319 | /* |
| 285 | * Global Lock interfaces | 320 | * Global Lock interfaces |
| 286 | */ | 321 | */ |
| 287 | acpi_status acpi_acquire_global_lock(u16 timeout, u32 * handle); | 322 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 288 | 323 | acpi_acquire_global_lock(u16 timeout, | |
| 289 | acpi_status acpi_release_global_lock(u32 handle); | 324 | u32 *handle)) |
| 325 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
| 326 | acpi_release_global_lock(u32 handle)) | ||
| 290 | 327 | ||
| 291 | /* | 328 | /* |
| 292 | * Interfaces to AML mutex objects | 329 | * Interfaces to AML mutex objects |
| @@ -299,47 +336,75 @@ acpi_status acpi_release_mutex(acpi_handle handle, acpi_string pathname); | |||
| 299 | /* | 336 | /* |
| 300 | * Fixed Event interfaces | 337 | * Fixed Event interfaces |
| 301 | */ | 338 | */ |
| 302 | acpi_status acpi_enable_event(u32 event, u32 flags); | 339 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 303 | 340 | acpi_enable_event(u32 event, u32 flags)) | |
| 304 | acpi_status acpi_disable_event(u32 event, u32 flags); | ||
| 305 | 341 | ||
| 306 | acpi_status acpi_clear_event(u32 event); | 342 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 343 | acpi_disable_event(u32 event, u32 flags)) | ||
| 307 | 344 | ||
| 308 | acpi_status acpi_get_event_status(u32 event, acpi_event_status * event_status); | 345 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_clear_event(u32 event)) |
| 309 | 346 | ||
| 347 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
| 348 | acpi_get_event_status(u32 event, | ||
| 349 | acpi_event_status | ||
| 350 | *event_status)) | ||
| 310 | /* | 351 | /* |
| 311 | * General Purpose Event (GPE) Interfaces | 352 | * General Purpose Event (GPE) Interfaces |
| 312 | */ | 353 | */ |
| 313 | acpi_status acpi_enable_gpe(acpi_handle gpe_device, u32 gpe_number); | 354 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_update_all_gpes(void)) |
| 314 | 355 | ||
| 315 | acpi_status acpi_disable_gpe(acpi_handle gpe_device, u32 gpe_number); | 356 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 316 | 357 | acpi_enable_gpe(acpi_handle gpe_device, | |
| 317 | acpi_status acpi_clear_gpe(acpi_handle gpe_device, u32 gpe_number); | 358 | u32 gpe_number)) |
| 318 | 359 | ||
| 319 | acpi_status | 360 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 320 | acpi_setup_gpe_for_wake(acpi_handle parent_device, | 361 | acpi_disable_gpe(acpi_handle gpe_device, |
| 321 | acpi_handle gpe_device, u32 gpe_number); | 362 | u32 gpe_number)) |
| 322 | 363 | ||
| 323 | acpi_status acpi_set_gpe_wake_mask(acpi_handle gpe_device, u32 gpe_number, u8 action); | 364 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 324 | 365 | acpi_clear_gpe(acpi_handle gpe_device, | |
| 325 | acpi_status | 366 | u32 gpe_number)) |
| 326 | acpi_get_gpe_status(acpi_handle gpe_device, | 367 | |
| 327 | u32 gpe_number, acpi_event_status *event_status); | 368 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 328 | 369 | acpi_set_gpe(acpi_handle gpe_device, | |
| 329 | acpi_status acpi_disable_all_gpes(void); | 370 | u32 gpe_number, u8 action)) |
| 330 | 371 | ||
| 331 | acpi_status acpi_enable_all_runtime_gpes(void); | 372 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 332 | 373 | acpi_finish_gpe(acpi_handle gpe_device, | |
| 333 | acpi_status acpi_get_gpe_device(u32 gpe_index, acpi_handle *gpe_device); | 374 | u32 gpe_number)) |
| 334 | 375 | ||
| 335 | acpi_status | 376 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 336 | acpi_install_gpe_block(acpi_handle gpe_device, | 377 | acpi_setup_gpe_for_wake(acpi_handle |
| 337 | struct acpi_generic_address *gpe_block_address, | 378 | parent_device, |
| 338 | u32 register_count, u32 interrupt_number); | 379 | acpi_handle gpe_device, |
| 339 | 380 | u32 gpe_number)) | |
| 340 | acpi_status acpi_remove_gpe_block(acpi_handle gpe_device); | 381 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 341 | 382 | acpi_set_gpe_wake_mask(acpi_handle gpe_device, | |
| 342 | acpi_status acpi_update_all_gpes(void); | 383 | u32 gpe_number, |
| 384 | u8 action)) | ||
| 385 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
| 386 | acpi_get_gpe_status(acpi_handle gpe_device, | ||
| 387 | u32 gpe_number, | ||
| 388 | acpi_event_status | ||
| 389 | *event_status)) | ||
| 390 | |||
| 391 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_disable_all_gpes(void)) | ||
| 392 | |||
| 393 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_enable_all_runtime_gpes(void)) | ||
| 394 | |||
| 395 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
| 396 | acpi_get_gpe_device(u32 gpe_index, | ||
| 397 | acpi_handle * gpe_device)) | ||
| 398 | |||
| 399 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
| 400 | acpi_install_gpe_block(acpi_handle gpe_device, | ||
| 401 | struct | ||
| 402 | acpi_generic_address | ||
| 403 | *gpe_block_address, | ||
| 404 | u32 register_count, | ||
| 405 | u32 interrupt_number)) | ||
| 406 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
| 407 | acpi_remove_gpe_block(acpi_handle gpe_device)) | ||
| 343 | 408 | ||
| 344 | /* | 409 | /* |
| 345 | * Resource interfaces | 410 | * Resource interfaces |
| @@ -391,34 +456,60 @@ acpi_buffer_to_resource(u8 *aml_buffer, | |||
| 391 | */ | 456 | */ |
| 392 | acpi_status acpi_reset(void); | 457 | acpi_status acpi_reset(void); |
| 393 | 458 | ||
| 394 | acpi_status acpi_read_bit_register(u32 register_id, u32 *return_value); | 459 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 460 | acpi_read_bit_register(u32 register_id, | ||
| 461 | u32 *return_value)) | ||
| 395 | 462 | ||
| 396 | acpi_status acpi_write_bit_register(u32 register_id, u32 value); | 463 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 464 | acpi_write_bit_register(u32 register_id, | ||
| 465 | u32 value)) | ||
| 397 | 466 | ||
| 398 | acpi_status acpi_set_firmware_waking_vector(u32 physical_address); | 467 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 468 | acpi_set_firmware_waking_vector(u32 | ||
| 469 | physical_address)) | ||
| 399 | 470 | ||
| 400 | #if ACPI_MACHINE_WIDTH == 64 | 471 | #if ACPI_MACHINE_WIDTH == 64 |
| 401 | acpi_status acpi_set_firmware_waking_vector64(u64 physical_address); | 472 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status |
| 473 | acpi_set_firmware_waking_vector64(u64 | ||
| 474 | physical_address)) | ||
| 402 | #endif | 475 | #endif |
| 403 | 476 | ||
| 404 | acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg); | 477 | acpi_status acpi_read(u64 *value, struct acpi_generic_address *reg); |
| 405 | 478 | ||
| 406 | acpi_status acpi_write(u64 value, struct acpi_generic_address *reg); | 479 | acpi_status acpi_write(u64 value, struct acpi_generic_address *reg); |
| 407 | 480 | ||
| 481 | /* | ||
| 482 | * Sleep/Wake interfaces | ||
| 483 | */ | ||
| 408 | acpi_status | 484 | acpi_status |
| 409 | acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b); | 485 | acpi_get_sleep_type_data(u8 sleep_state, u8 * slp_typ_a, u8 * slp_typ_b); |
| 410 | 486 | ||
| 411 | acpi_status acpi_enter_sleep_state_prep(u8 sleep_state); | 487 | acpi_status acpi_enter_sleep_state_prep(u8 sleep_state); |
| 412 | 488 | ||
| 413 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state); | 489 | acpi_status asmlinkage acpi_enter_sleep_state(u8 sleep_state, u8 flags); |
| 414 | 490 | ||
| 415 | acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void); | 491 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status asmlinkage acpi_enter_sleep_state_s4bios(void)) |
| 416 | 492 | ||
| 417 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state); | 493 | acpi_status acpi_leave_sleep_state_prep(u8 sleep_state, u8 flags); |
| 418 | 494 | ||
| 419 | acpi_status acpi_leave_sleep_state(u8 sleep_state); | 495 | acpi_status acpi_leave_sleep_state(u8 sleep_state); |
| 420 | 496 | ||
| 421 | /* | 497 | /* |
| 498 | * ACPI Timer interfaces | ||
| 499 | */ | ||
| 500 | #ifdef ACPI_FUTURE_USAGE | ||
| 501 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
| 502 | acpi_get_timer_resolution(u32 *resolution)) | ||
| 503 | |||
| 504 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status acpi_get_timer(u32 *ticks)) | ||
| 505 | |||
| 506 | ACPI_HW_DEPENDENT_RETURN_STATUS(acpi_status | ||
| 507 | acpi_get_timer_duration(u32 start_ticks, | ||
| 508 | u32 end_ticks, | ||
| 509 | u32 *time_elapsed)) | ||
| 510 | #endif /* ACPI_FUTURE_USAGE */ | ||
| 511 | |||
| 512 | /* | ||
| 422 | * Error/Warning output | 513 | * Error/Warning output |
| 423 | */ | 514 | */ |
| 424 | void ACPI_INTERNAL_VAR_XFACE | 515 | void ACPI_INTERNAL_VAR_XFACE |
diff --git a/include/acpi/actbl.h b/include/acpi/actbl.h index 8e1b92f6f650..8dea54665dcf 100644 --- a/include/acpi/actbl.h +++ b/include/acpi/actbl.h | |||
| @@ -309,6 +309,13 @@ enum acpi_prefered_pm_profiles { | |||
| 309 | PM_TABLET = 8 | 309 | PM_TABLET = 8 |
| 310 | }; | 310 | }; |
| 311 | 311 | ||
| 312 | /* Values for sleep_status and sleep_control registers (V5 FADT) */ | ||
| 313 | |||
| 314 | #define ACPI_X_WAKE_STATUS 0x80 | ||
| 315 | #define ACPI_X_SLEEP_TYPE_MASK 0x1C | ||
| 316 | #define ACPI_X_SLEEP_TYPE_POSITION 0x02 | ||
| 317 | #define ACPI_X_SLEEP_ENABLE 0x20 | ||
| 318 | |||
| 312 | /* Reset to default packing */ | 319 | /* Reset to default packing */ |
| 313 | 320 | ||
| 314 | #pragma pack() | 321 | #pragma pack() |
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index d5dee7ce9474..eba66043cf1b 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h | |||
| @@ -518,6 +518,13 @@ typedef u64 acpi_integer; | |||
| 518 | #define ACPI_SLEEP_TYPE_INVALID 0xFF | 518 | #define ACPI_SLEEP_TYPE_INVALID 0xFF |
| 519 | 519 | ||
| 520 | /* | 520 | /* |
| 521 | * Sleep/Wake flags | ||
| 522 | */ | ||
| 523 | #define ACPI_NO_OPTIONAL_METHODS 0x00 /* Do not execute any optional methods */ | ||
| 524 | #define ACPI_EXECUTE_GTS 0x01 /* For enter sleep interface */ | ||
| 525 | #define ACPI_EXECUTE_BFS 0x02 /* For leave sleep prep interface */ | ||
| 526 | |||
| 527 | /* | ||
| 521 | * Standard notify values | 528 | * Standard notify values |
| 522 | */ | 529 | */ |
| 523 | #define ACPI_NOTIFY_BUS_CHECK (u8) 0x00 | 530 | #define ACPI_NOTIFY_BUS_CHECK (u8) 0x00 |
| @@ -532,8 +539,9 @@ typedef u64 acpi_integer; | |||
| 532 | #define ACPI_NOTIFY_DEVICE_PLD_CHECK (u8) 0x09 | 539 | #define ACPI_NOTIFY_DEVICE_PLD_CHECK (u8) 0x09 |
| 533 | #define ACPI_NOTIFY_RESERVED (u8) 0x0A | 540 | #define ACPI_NOTIFY_RESERVED (u8) 0x0A |
| 534 | #define ACPI_NOTIFY_LOCALITY_UPDATE (u8) 0x0B | 541 | #define ACPI_NOTIFY_LOCALITY_UPDATE (u8) 0x0B |
| 542 | #define ACPI_NOTIFY_SHUTDOWN_REQUEST (u8) 0x0C | ||
| 535 | 543 | ||
| 536 | #define ACPI_NOTIFY_MAX 0x0B | 544 | #define ACPI_NOTIFY_MAX 0x0C |
| 537 | 545 | ||
| 538 | /* | 546 | /* |
| 539 | * Types associated with ACPI names and objects. The first group of | 547 | * Types associated with ACPI names and objects. The first group of |
| @@ -698,7 +706,8 @@ typedef u32 acpi_event_status; | |||
| 698 | #define ACPI_ALL_NOTIFY (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY) | 706 | #define ACPI_ALL_NOTIFY (ACPI_SYSTEM_NOTIFY | ACPI_DEVICE_NOTIFY) |
| 699 | #define ACPI_MAX_NOTIFY_HANDLER_TYPE 0x3 | 707 | #define ACPI_MAX_NOTIFY_HANDLER_TYPE 0x3 |
| 700 | 708 | ||
| 701 | #define ACPI_MAX_SYS_NOTIFY 0x7f | 709 | #define ACPI_MAX_SYS_NOTIFY 0x7F |
| 710 | #define ACPI_MAX_DEVICE_SPECIFIC_NOTIFY 0xBF | ||
| 702 | 711 | ||
| 703 | /* Address Space (Operation Region) Types */ | 712 | /* Address Space (Operation Region) Types */ |
| 704 | 713 | ||
| @@ -786,6 +795,15 @@ typedef u8 acpi_adr_space_type; | |||
| 786 | #define ACPI_ENABLE_EVENT 1 | 795 | #define ACPI_ENABLE_EVENT 1 |
| 787 | #define ACPI_DISABLE_EVENT 0 | 796 | #define ACPI_DISABLE_EVENT 0 |
| 788 | 797 | ||
| 798 | /* Sleep function dispatch */ | ||
| 799 | |||
| 800 | typedef acpi_status(*ACPI_SLEEP_FUNCTION) (u8 sleep_state, u8 flags); | ||
| 801 | |||
| 802 | struct acpi_sleep_functions { | ||
| 803 | ACPI_SLEEP_FUNCTION legacy_function; | ||
| 804 | ACPI_SLEEP_FUNCTION extended_function; | ||
| 805 | }; | ||
| 806 | |||
| 789 | /* | 807 | /* |
| 790 | * External ACPI object definition | 808 | * External ACPI object definition |
| 791 | */ | 809 | */ |
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 | ||
| 376 | void acpi_os_set_prepare_sleep(int (*func)(u8 sleep_state, | ||
| 377 | u32 pm1a_ctrl, u32 pm1b_ctrl)); | ||
| 378 | |||
| 379 | acpi_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 | ||
| 102 | DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices); | 105 | DECLARE_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 | ||
| 120 | struct cpuidle_driver { | 123 | struct 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); | |||
| 140 | extern void cpuidle_resume_and_unlock(void); | 145 | extern void cpuidle_resume_and_unlock(void); |
| 141 | extern int cpuidle_enable_device(struct cpuidle_device *dev); | 146 | extern int cpuidle_enable_device(struct cpuidle_device *dev); |
| 142 | extern void cpuidle_disable_device(struct cpuidle_device *dev); | 147 | extern void cpuidle_disable_device(struct cpuidle_device *dev); |
| 148 | extern 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)); | ||
| 152 | extern int cpuidle_play_dead(void); | ||
| 143 | 153 | ||
| 144 | #else | 154 | #else |
| 145 | static inline void disable_cpuidle(void) { } | 155 | static inline void disable_cpuidle(void) { } |
| @@ -157,6 +167,12 @@ static inline void cpuidle_resume_and_unlock(void) { } | |||
| 157 | static inline int cpuidle_enable_device(struct cpuidle_device *dev) | 167 | static inline int cpuidle_enable_device(struct cpuidle_device *dev) |
| 158 | {return -ENODEV; } | 168 | {return -ENODEV; } |
| 159 | static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } | 169 | static inline void cpuidle_disable_device(struct cpuidle_device *dev) { } |
| 170 | static 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; } | ||
| 175 | static 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 */ | ||
| 21 | struct 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 | ||
| 144 | extern void tboot_probe(void); | 144 | extern void tboot_probe(void); |
| 145 | extern void tboot_shutdown(u32 shutdown_type); | 145 | extern void tboot_shutdown(u32 shutdown_type); |
| 146 | extern void tboot_sleep(u8 sleep_state, u32 pm1a_control, u32 pm1b_control); | ||
| 147 | extern struct acpi_table_header *tboot_get_dmar_table( | 146 | extern struct acpi_table_header *tboot_get_dmar_table( |
| 148 | struct acpi_table_header *dmar_tbl); | 147 | struct acpi_table_header *dmar_tbl); |
| 149 | extern int tboot_force_iommu(void); | 148 | extern int tboot_force_iommu(void); |
