aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2007-02-02 11:48:23 -0500
committerLen Brown <len.brown@intel.com>2007-02-02 21:14:30 -0500
commit59fa85057e12ff135df54266722b2064c418fc05 (patch)
tree697a677e71f9c9e23a13d62df720a3778de6c1d4 /include/acpi
parentff40c8a3f258e9a54b0b94b92d5e2d9d88a39954 (diff)
ACPICA: Removed all 16-bit support.
Support for 16-bit ACPICA has been completely removed since it is no longer necessary and it clutters the code. All 16-bit macros, types, and conditional compiles have been removed, cleaning up and simplifying the code across the entire subsystem. DOS support is no longer needed since the Linux firmware kit is now available. Signed-off-by: Alexey Starikovskiy <alexey.y.starikovskiy@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acmacros.h68
-rw-r--r--include/acpi/actypes.h40
2 files changed, 2 insertions, 106 deletions
diff --git a/include/acpi/acmacros.h b/include/acpi/acmacros.h
index 9b2e4d7154a4..549e533892a7 100644
--- a/include/acpi/acmacros.h
+++ b/include/acpi/acmacros.h
@@ -61,20 +61,6 @@
61 61
62#define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0])) 62#define ACPI_ARRAY_LENGTH(x) (sizeof(x) / sizeof((x)[0]))
63 63
64#if ACPI_MACHINE_WIDTH == 16
65
66/*
67 * For 16-bit addresses, we have to assume that the upper 32 bits
68 * (out of 64) are zero.
69 */
70#define ACPI_LODWORD(l) ((u32)(l))
71#define ACPI_HIDWORD(l) ((u32)(0))
72
73#define ACPI_GET_ADDRESS(a) ((a).lo)
74#define ACPI_STORE_ADDRESS(a,b) {(a).hi=0;(a).lo=(u32)(b);}
75#define ACPI_VALID_ADDRESS(a) ((a).hi | (a).lo)
76
77#else
78#ifdef ACPI_NO_INTEGER64_SUPPORT 64#ifdef ACPI_NO_INTEGER64_SUPPORT
79/* 65/*
80 * acpi_integer is 32-bits, no 64-bit support on this platform 66 * acpi_integer is 32-bits, no 64-bit support on this platform
@@ -82,10 +68,6 @@
82#define ACPI_LODWORD(l) ((u32)(l)) 68#define ACPI_LODWORD(l) ((u32)(l))
83#define ACPI_HIDWORD(l) ((u32)(0)) 69#define ACPI_HIDWORD(l) ((u32)(0))
84 70
85#define ACPI_GET_ADDRESS(a) (a)
86#define ACPI_STORE_ADDRESS(a,b) ((a)=(b))
87#define ACPI_VALID_ADDRESS(a) (a)
88
89#else 71#else
90 72
91/* 73/*
@@ -93,11 +75,6 @@
93 */ 75 */
94#define ACPI_LODWORD(l) ((u32)(u64)(l)) 76#define ACPI_LODWORD(l) ((u32)(u64)(l))
95#define ACPI_HIDWORD(l) ((u32)(((*(struct uint64_struct *)(void *)(&l))).hi)) 77#define ACPI_HIDWORD(l) ((u32)(((*(struct uint64_struct *)(void *)(&l))).hi))
96
97#define ACPI_GET_ADDRESS(a) (a)
98#define ACPI_STORE_ADDRESS(a,b) ((a)=(acpi_physical_address)(b))
99#define ACPI_VALID_ADDRESS(a) (a)
100#endif
101#endif 78#endif
102 79
103/* 80/*
@@ -135,15 +112,8 @@
135#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void,(void *) NULL,(acpi_native_uint) i) 112#define ACPI_TO_POINTER(i) ACPI_ADD_PTR (void,(void *) NULL,(acpi_native_uint) i)
136#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL) 113#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p,(void *) NULL)
137#define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL) 114#define ACPI_OFFSET(d,f) (acpi_size) ACPI_PTR_DIFF (&(((d *)0)->f),(void *) NULL)
138
139#if ACPI_MACHINE_WIDTH == 16
140#define ACPI_STORE_POINTER(d,s) ACPI_MOVE_32_TO_32(d,s)
141#define ACPI_PHYSADDR_TO_PTR(i) (void *)(i)
142#define ACPI_PTR_TO_PHYSADDR(i) (u32) ACPI_CAST_PTR (u8,(i))
143#else
144#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i) 115#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i)
145#define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i) 116#define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i)
146#endif
147 117
148#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED 118#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
149#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32,(a)) == *ACPI_CAST_PTR (u32,(b))) 119#define ACPI_COMPARE_NAME(a,b) (*ACPI_CAST_PTR (u32,(a)) == *ACPI_CAST_PTR (u32,(b)))
@@ -224,28 +194,6 @@
224 194
225/* The hardware supports unaligned transfers, just do the little-endian move */ 195/* The hardware supports unaligned transfers, just do the little-endian move */
226 196
227#if ACPI_MACHINE_WIDTH == 16
228
229/* No 64-bit integers */
230/* 16-bit source, 16/32/64 destination */
231
232#define ACPI_MOVE_16_TO_16(d,s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s)
233#define ACPI_MOVE_16_TO_32(d,s) *(u32 *)(void *)(d) = *(u16 *)(void *)(s)
234#define ACPI_MOVE_16_TO_64(d,s) ACPI_MOVE_16_TO_32(d,s)
235
236/* 32-bit source, 16/32/64 destination */
237
238#define ACPI_MOVE_32_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
239#define ACPI_MOVE_32_TO_32(d,s) *(u32 *)(void *)(d) = *(u32 *)(void *)(s)
240#define ACPI_MOVE_32_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s)
241
242/* 64-bit source, 16/32/64 destination */
243
244#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
245#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
246#define ACPI_MOVE_64_TO_64(d,s) ACPI_MOVE_32_TO_32(d,s)
247
248#else
249/* 16-bit source, 16/32/64 destination */ 197/* 16-bit source, 16/32/64 destination */
250 198
251#define ACPI_MOVE_16_TO_16(d,s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s) 199#define ACPI_MOVE_16_TO_16(d,s) *(u16 *)(void *)(d) = *(u16 *)(void *)(s)
@@ -263,7 +211,6 @@
263#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */ 211#define ACPI_MOVE_64_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s) /* Truncate to 16 */
264#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */ 212#define ACPI_MOVE_64_TO_32(d,s) ACPI_MOVE_32_TO_32(d,s) /* Truncate to 32 */
265#define ACPI_MOVE_64_TO_64(d,s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s) 213#define ACPI_MOVE_64_TO_64(d,s) *(u64 *)(void *)(d) = *(u64 *)(void *)(s)
266#endif
267 214
268#else 215#else
269/* 216/*
@@ -308,10 +255,7 @@
308 255
309/* Macros based on machine integer width */ 256/* Macros based on machine integer width */
310 257
311#if ACPI_MACHINE_WIDTH == 16 258#if ACPI_MACHINE_WIDTH == 32
312#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_16_TO_16(d,s)
313
314#elif ACPI_MACHINE_WIDTH == 32
315#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_32_TO_16(d,s) 259#define ACPI_MOVE_SIZE_TO_16(d,s) ACPI_MOVE_32_TO_16(d,s)
316 260
317#elif ACPI_MACHINE_WIDTH == 64 261#elif ACPI_MACHINE_WIDTH == 64
@@ -696,16 +640,6 @@
696#define ACPI_DEBUGGER_EXEC(a) 640#define ACPI_DEBUGGER_EXEC(a)
697#endif 641#endif
698 642
699/*
700 * For 16-bit code, we want to shrink some things even though
701 * we are using ACPI_DEBUG_OUTPUT to get the debug output
702 */
703#if ACPI_MACHINE_WIDTH == 16
704#undef ACPI_DEBUG_ONLY_MEMBERS
705#undef _VERBOSE_STRUCTURES
706#define ACPI_DEBUG_ONLY_MEMBERS(a)
707#endif
708
709#ifdef ACPI_DEBUG_OUTPUT 643#ifdef ACPI_DEBUG_OUTPUT
710/* 644/*
711 * 1) Set name to blanks 645 * 1) Set name to blanks
diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h
index d213f9782154..fff2d242ace4 100644
--- a/include/acpi/actypes.h
+++ b/include/acpi/actypes.h
@@ -149,14 +149,12 @@ typedef int INT32;
149typedef u64 acpi_native_uint; 149typedef u64 acpi_native_uint;
150typedef s64 acpi_native_int; 150typedef s64 acpi_native_int;
151 151
152typedef u64 acpi_table_ptr;
153typedef u64 acpi_io_address; 152typedef u64 acpi_io_address;
154typedef u64 acpi_physical_address; 153typedef u64 acpi_physical_address;
155 154
156#define ACPI_MAX_PTR ACPI_UINT64_MAX 155#define ACPI_MAX_PTR ACPI_UINT64_MAX
157#define ACPI_SIZE_MAX ACPI_UINT64_MAX 156#define ACPI_SIZE_MAX ACPI_UINT64_MAX
158 157
159#define ACPI_NATIVE_BOUNDARY 8
160#define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */ 158#define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */
161 159
162/* 160/*
@@ -190,51 +188,15 @@ typedef int INT32;
190typedef u32 acpi_native_uint; 188typedef u32 acpi_native_uint;
191typedef s32 acpi_native_int; 189typedef s32 acpi_native_int;
192 190
193typedef u64 acpi_table_ptr;
194typedef u32 acpi_io_address; 191typedef u32 acpi_io_address;
195typedef u32 acpi_physical_address; 192typedef u32 acpi_physical_address;
196 193
197#define ACPI_MAX_PTR ACPI_UINT32_MAX 194#define ACPI_MAX_PTR ACPI_UINT32_MAX
198#define ACPI_SIZE_MAX ACPI_UINT32_MAX 195#define ACPI_SIZE_MAX ACPI_UINT32_MAX
199 196
200#define ACPI_NATIVE_BOUNDARY 4
201
202/*******************************************************************************
203 *
204 * Types specific to 16-bit targets
205 *
206 ******************************************************************************/
207
208#elif ACPI_MACHINE_WIDTH == 16
209
210/*! [Begin] no source code translation (keep the typedefs as-is) */
211
212typedef unsigned long UINT32;
213typedef short INT16;
214typedef long INT32;
215
216/*! [End] no source code translation !*/
217
218typedef u16 acpi_native_uint;
219typedef s16 acpi_native_int;
220
221typedef u32 acpi_table_ptr;
222typedef u32 acpi_io_address;
223typedef char *acpi_physical_address;
224
225#define ACPI_MAX_PTR ACPI_UINT16_MAX
226#define ACPI_SIZE_MAX ACPI_UINT16_MAX
227
228#define ACPI_NATIVE_BOUNDARY 2
229#define ACPI_USE_NATIVE_DIVIDE /* No 64-bit integers, ok to use native divide */
230
231/* 64-bit integers cannot be supported */
232
233#define ACPI_NO_INTEGER64_SUPPORT
234
235#else 197#else
236 198
237/* ACPI_MACHINE_WIDTH must be either 64, 32, or 16 */ 199/* ACPI_MACHINE_WIDTH must be either 64 or 32 */
238 200
239#error unknown ACPI_MACHINE_WIDTH 201#error unknown ACPI_MACHINE_WIDTH
240#endif 202#endif