X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Facpi%2Factypes.h;h=6fa3f2a13db5799595273baf5b1864d66d1dfc61;hb=a6823e12ca3f79a8c0f8b2d14976ab2152d117e5;hp=77cf1236b05ac5fe45ddb2851e7c9a936ecd9db8;hpb=3145012c1c34a3504a2234bd2034ca6ea4767bc5;p=linux-2.6 diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 77cf1236b0..6fa3f2a13d 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -191,7 +191,7 @@ typedef s32 acpi_native_int; typedef u64 acpi_table_ptr; typedef u32 acpi_io_address; -typedef u64 acpi_physical_address; +typedef u32 acpi_physical_address; #define ACPI_MAX_PTR ACPI_UINT32_MAX #define ACPI_SIZE_MAX ACPI_UINT32_MAX @@ -241,7 +241,7 @@ typedef acpi_native_uint acpi_size; /******************************************************************************* * - * OS- or compiler-dependent types + * OS-dependent and compiler-dependent types * * If the defaults below are not appropriate for the host system, they can * be defined in the compiler-specific or OS-specific header, and this will @@ -249,29 +249,36 @@ typedef acpi_native_uint acpi_size; * ******************************************************************************/ -/* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ +/* Value returned by acpi_os_get_thread_id */ -#ifndef acpi_uintptr_t -#define acpi_uintptr_t void * +#ifndef acpi_thread_id +#define acpi_thread_id acpi_native_uint #endif -/* - * If acpi_cache_t was not defined in the OS-dependent header, - * define it now. This is typically the case where the local cache - * manager implementation is to be used (ACPI_USE_LOCAL_CACHE) - */ -#ifndef acpi_cache_t -#define acpi_cache_t struct acpi_memory_list +/* Object returned from acpi_os_create_lock */ + +#ifndef acpi_spinlock +#define acpi_spinlock void * #endif -/* - * Allow the CPU flags word to be defined per-OS to simplify the use of the - * lock and unlock OSL interfaces. - */ +/* Flags for acpi_os_acquire_lock/acpi_os_release_lock */ + #ifndef acpi_cpu_flags #define acpi_cpu_flags acpi_native_uint #endif +/* Object returned from acpi_os_create_cache */ + +#ifndef acpi_cache_t +#define acpi_cache_t struct acpi_memory_list +#endif + +/* Use C99 uintptr_t for pointer casting if available, "void *" otherwise */ + +#ifndef acpi_uintptr_t +#define acpi_uintptr_t void * +#endif + /* * ACPI_PRINTF_LIKE is used to tag functions as "printf-like" because * some compilers can catch printf format string problems @@ -298,49 +305,12 @@ typedef acpi_native_uint acpi_size; #define ACPI_EXPORT_SYMBOL(symbol) #endif -/* - * thread_id is returned by acpi_os_get_thread_id. - */ -#ifndef acpi_thread_id -#define acpi_thread_id acpi_native_uint -#endif - /******************************************************************************* * * Independent types * ******************************************************************************/ -/* - * Pointer overlays to avoid lots of typecasting for - * code that accepts both physical and logical pointers. - */ -union acpi_pointers { - acpi_physical_address physical; - void *logical; - acpi_table_ptr value; -}; - -struct acpi_pointer { - u32 pointer_type; - union acpi_pointers pointer; -}; - -/* pointer_types for above */ - -#define ACPI_PHYSICAL_POINTER 0x01 -#define ACPI_LOGICAL_POINTER 0x02 - -/* Processor mode */ - -#define ACPI_PHYSICAL_ADDRESSING 0x04 -#define ACPI_LOGICAL_ADDRESSING 0x08 -#define ACPI_MEMORY_MODE 0x0C - -#define ACPI_PHYSMODE_PHYSPTR ACPI_PHYSICAL_ADDRESSING | ACPI_PHYSICAL_POINTER -#define ACPI_LOGMODE_PHYSPTR ACPI_LOGICAL_ADDRESSING | ACPI_PHYSICAL_POINTER -#define ACPI_LOGMODE_LOGPTR ACPI_LOGICAL_ADDRESSING | ACPI_LOGICAL_POINTER - /* Logical defines and NULL */ #ifdef FALSE @@ -380,6 +350,11 @@ struct uint32_struct { u32 hi; }; +/* Synchronization objects */ + +#define acpi_mutex void * +#define acpi_semaphore void * + /* * Acpi integer width. In ACPI version 1, integers are * 32 bits. In ACPI version 2, integers are 64 bits. @@ -437,7 +412,8 @@ typedef u64 acpi_integer; /* * Initialization state */ -#define ACPI_INITIALIZED_OK 0x01 +#define ACPI_SUBSYSTEM_INITIALIZE 0x01 +#define ACPI_INITIALIZED_OK 0x02 /* * Power state values @@ -485,21 +461,6 @@ typedef u64 acpi_integer; #define ACPI_NOTIFY_BUS_MODE_MISMATCH (u8) 6 #define ACPI_NOTIFY_POWER_FAULT (u8) 7 -/* - * Table types. These values are passed to the table related APIs - */ -typedef u32 acpi_table_type; - -#define ACPI_TABLE_ID_RSDP (acpi_table_type) 0 -#define ACPI_TABLE_ID_DSDT (acpi_table_type) 1 -#define ACPI_TABLE_ID_FADT (acpi_table_type) 2 -#define ACPI_TABLE_ID_FACS (acpi_table_type) 3 -#define ACPI_TABLE_ID_PSDT (acpi_table_type) 4 -#define ACPI_TABLE_ID_SSDT (acpi_table_type) 5 -#define ACPI_TABLE_ID_XSDT (acpi_table_type) 6 -#define ACPI_TABLE_ID_MAX 6 -#define ACPI_NUM_TABLE_TYPES (ACPI_TABLE_ID_MAX+1) - /* * Types associated with ACPI names and objects. The first group of * values (up to ACPI_TYPE_EXTERNAL_MAX) correspond to the definition @@ -632,7 +593,7 @@ typedef u32 acpi_event_status; * | | | +--- Type of dispatch -- to method, handler, or none * | | +--- Enabled for runtime? * | +--- Enabled for wake? - * +--- System state when GPE ocurred (running/waking) + * +--- Unused */ #define ACPI_GPE_XRUPT_TYPE_MASK (u8) 0x01 #define ACPI_GPE_LEVEL_TRIGGERED (u8) 0x01 @@ -658,10 +619,6 @@ typedef u32 acpi_event_status; #define ACPI_GPE_ENABLE_MASK (u8) 0x60 /* Both run/wake */ -#define ACPI_GPE_SYSTEM_MASK (u8) 0x80 -#define ACPI_GPE_SYSTEM_RUNNING (u8) 0x80 -#define ACPI_GPE_SYSTEM_WAKING (u8) 0x00 - /* * Flags for GPE and Lock interfaces */ @@ -810,13 +767,6 @@ struct acpi_buffer { #define ACPI_SYS_MODE_LEGACY 0x0002 #define ACPI_SYS_MODES_MASK 0x0003 -/* - * ACPI Table Info. One per ACPI table _type_ - */ -struct acpi_table_info { - u32 count; -}; - /* * System info returned by acpi_get_system_info() */ @@ -828,8 +778,6 @@ struct acpi_system_info { u32 reserved2; u32 debug_level; u32 debug_layer; - u32 num_table_types; - struct acpi_table_info table_info[ACPI_TABLE_ID_MAX + 1]; }; /*