diff options
Diffstat (limited to 'include/acpi/amlresrc.h')
-rw-r--r-- | include/acpi/amlresrc.h | 85 |
1 files changed, 46 insertions, 39 deletions
diff --git a/include/acpi/amlresrc.h b/include/acpi/amlresrc.h index fb4735315ad3..be03818af9d1 100644 --- a/include/acpi/amlresrc.h +++ b/include/acpi/amlresrc.h | |||
@@ -42,39 +42,45 @@ | |||
42 | * POSSIBILITY OF SUCH DAMAGES. | 42 | * POSSIBILITY OF SUCH DAMAGES. |
43 | */ | 43 | */ |
44 | 44 | ||
45 | /* acpisrc:struct_defs -- for acpisrc conversion */ | ||
46 | |||
45 | #ifndef __AMLRESRC_H | 47 | #ifndef __AMLRESRC_H |
46 | #define __AMLRESRC_H | 48 | #define __AMLRESRC_H |
47 | 49 | ||
48 | #define ASL_RESNAME_ADDRESS "_ADR" | 50 | /* |
49 | #define ASL_RESNAME_ALIGNMENT "_ALN" | 51 | * Resource descriptor tags, as defined in the ACPI specification. |
50 | #define ASL_RESNAME_ADDRESSSPACE "_ASI" | 52 | * Used to symbolically reference fields within a descriptor. |
51 | #define ASL_RESNAME_ACCESSSIZE "_ASZ" | 53 | */ |
52 | #define ASL_RESNAME_TYPESPECIFICATTRIBUTES "_ATT" | 54 | #define ACPI_RESTAG_ADDRESS "_ADR" |
53 | #define ASL_RESNAME_BASEADDRESS "_BAS" | 55 | #define ACPI_RESTAG_ALIGNMENT "_ALN" |
54 | #define ASL_RESNAME_BUSMASTER "_BM_" /* Master(1), Slave(0) */ | 56 | #define ACPI_RESTAG_ADDRESSSPACE "_ASI" |
55 | #define ASL_RESNAME_DECODE "_DEC" | 57 | #define ACPI_RESTAG_ACCESSSIZE "_ASZ" |
56 | #define ASL_RESNAME_DMA "_DMA" | 58 | #define ACPI_RESTAG_TYPESPECIFICATTRIBUTES "_ATT" |
57 | #define ASL_RESNAME_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ | 59 | #define ACPI_RESTAG_BASEADDRESS "_BAS" |
58 | #define ASL_RESNAME_GRANULARITY "_GRA" | 60 | #define ACPI_RESTAG_BUSMASTER "_BM_" /* Master(1), Slave(0) */ |
59 | #define ASL_RESNAME_INTERRUPT "_INT" | 61 | #define ACPI_RESTAG_DECODE "_DEC" |
60 | #define ASL_RESNAME_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */ | 62 | #define ACPI_RESTAG_DMA "_DMA" |
61 | #define ASL_RESNAME_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */ | 63 | #define ACPI_RESTAG_DMATYPE "_TYP" /* Compatible(0), A(1), B(2), F(3) */ |
62 | #define ASL_RESNAME_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ | 64 | #define ACPI_RESTAG_GRANULARITY "_GRA" |
63 | #define ASL_RESNAME_LENGTH "_LEN" | 65 | #define ACPI_RESTAG_INTERRUPT "_INT" |
64 | #define ASL_RESNAME_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ | 66 | #define ACPI_RESTAG_INTERRUPTLEVEL "_LL_" /* active_lo(1), active_hi(0) */ |
65 | #define ASL_RESNAME_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ | 67 | #define ACPI_RESTAG_INTERRUPTSHARE "_SHR" /* Shareable(1), no_share(0) */ |
66 | #define ASL_RESNAME_MAXADDR "_MAX" | 68 | #define ACPI_RESTAG_INTERRUPTTYPE "_HE_" /* Edge(1), Level(0) */ |
67 | #define ASL_RESNAME_MINADDR "_MIN" | 69 | #define ACPI_RESTAG_LENGTH "_LEN" |
68 | #define ASL_RESNAME_MAXTYPE "_MAF" | 70 | #define ACPI_RESTAG_MEMATTRIBUTES "_MTP" /* Memory(0), Reserved(1), ACPI(2), NVS(3) */ |
69 | #define ASL_RESNAME_MINTYPE "_MIF" | 71 | #define ACPI_RESTAG_MEMTYPE "_MEM" /* non_cache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */ |
70 | #define ASL_RESNAME_REGISTERBITOFFSET "_RBO" | 72 | #define ACPI_RESTAG_MAXADDR "_MAX" |
71 | #define ASL_RESNAME_REGISTERBITWIDTH "_RBW" | 73 | #define ACPI_RESTAG_MINADDR "_MIN" |
72 | #define ASL_RESNAME_RANGETYPE "_RNG" | 74 | #define ACPI_RESTAG_MAXTYPE "_MAF" |
73 | #define ASL_RESNAME_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */ | 75 | #define ACPI_RESTAG_MINTYPE "_MIF" |
74 | #define ASL_RESNAME_TRANSLATION "_TRA" | 76 | #define ACPI_RESTAG_REGISTERBITOFFSET "_RBO" |
75 | #define ASL_RESNAME_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ | 77 | #define ACPI_RESTAG_REGISTERBITWIDTH "_RBW" |
76 | #define ASL_RESNAME_TYPE "_TTP" /* Translation(1), Static (0) */ | 78 | #define ACPI_RESTAG_RANGETYPE "_RNG" |
77 | #define ASL_RESNAME_XFERTYPE "_SIz" /* 8(0), 8_and16(1), 16(2) */ | 79 | #define ACPI_RESTAG_READWRITETYPE "_RW_" /* read_only(0), Writeable (1) */ |
80 | #define ACPI_RESTAG_TRANSLATION "_TRA" | ||
81 | #define ACPI_RESTAG_TRANSTYPE "_TRS" /* Sparse(1), Dense(0) */ | ||
82 | #define ACPI_RESTAG_TYPE "_TTP" /* Translation(1), Static (0) */ | ||
83 | #define ACPI_RESTAG_XFERTYPE "_SIZ" /* 8(0), 8_and16(1), 16(2) */ | ||
78 | 84 | ||
79 | /* Default sizes for "small" resource descriptors */ | 85 | /* Default sizes for "small" resource descriptors */ |
80 | 86 | ||
@@ -109,7 +115,7 @@ struct asl_resource_node { | |||
109 | * SMALL descriptors | 115 | * SMALL descriptors |
110 | */ | 116 | */ |
111 | #define AML_RESOURCE_SMALL_HEADER_COMMON \ | 117 | #define AML_RESOURCE_SMALL_HEADER_COMMON \ |
112 | u8 descriptor_type; | 118 | u8 descriptor_type; |
113 | 119 | ||
114 | struct aml_resource_small_header { | 120 | struct aml_resource_small_header { |
115 | AML_RESOURCE_SMALL_HEADER_COMMON}; | 121 | AML_RESOURCE_SMALL_HEADER_COMMON}; |
@@ -162,8 +168,8 @@ struct aml_resource_end_tag { | |||
162 | * LARGE descriptors | 168 | * LARGE descriptors |
163 | */ | 169 | */ |
164 | #define AML_RESOURCE_LARGE_HEADER_COMMON \ | 170 | #define AML_RESOURCE_LARGE_HEADER_COMMON \ |
165 | u8 descriptor_type;\ | 171 | u8 descriptor_type;\ |
166 | u16 resource_length; | 172 | u16 resource_length; |
167 | 173 | ||
168 | struct aml_resource_large_header { | 174 | struct aml_resource_large_header { |
169 | AML_RESOURCE_LARGE_HEADER_COMMON}; | 175 | AML_RESOURCE_LARGE_HEADER_COMMON}; |
@@ -194,9 +200,9 @@ struct aml_resource_fixed_memory32 { | |||
194 | }; | 200 | }; |
195 | 201 | ||
196 | #define AML_RESOURCE_ADDRESS_COMMON \ | 202 | #define AML_RESOURCE_ADDRESS_COMMON \ |
197 | u8 resource_type; \ | 203 | u8 resource_type; \ |
198 | u8 flags; \ | 204 | u8 flags; \ |
199 | u8 specific_flags; | 205 | u8 specific_flags; |
200 | 206 | ||
201 | struct aml_resource_address { | 207 | struct aml_resource_address { |
202 | AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_ADDRESS_COMMON}; | 208 | AML_RESOURCE_LARGE_HEADER_COMMON AML_RESOURCE_ADDRESS_COMMON}; |
@@ -266,6 +272,7 @@ struct aml_resource_generic_register { | |||
266 | union aml_resource { | 272 | union aml_resource { |
267 | /* Descriptor headers */ | 273 | /* Descriptor headers */ |
268 | 274 | ||
275 | u8 descriptor_type; | ||
269 | struct aml_resource_small_header small_header; | 276 | struct aml_resource_small_header small_header; |
270 | struct aml_resource_large_header large_header; | 277 | struct aml_resource_large_header large_header; |
271 | 278 | ||
@@ -296,9 +303,9 @@ union aml_resource { | |||
296 | /* Utility overlays */ | 303 | /* Utility overlays */ |
297 | 304 | ||
298 | struct aml_resource_address address; | 305 | struct aml_resource_address address; |
299 | u32 u32_item; | 306 | u32 dword_item; |
300 | u16 u16_item; | 307 | u16 word_item; |
301 | u8 U8item; | 308 | u8 byte_item; |
302 | }; | 309 | }; |
303 | 310 | ||
304 | #endif | 311 | #endif |