achware.h revision 1.1.1.2.4.2 1 1.1.1.2.4.2 rmind /******************************************************************************
2 1.1.1.2.4.2 rmind *
3 1.1.1.2.4.2 rmind * Name: achware.h -- hardware specific interfaces
4 1.1.1.2.4.2 rmind *
5 1.1.1.2.4.2 rmind *****************************************************************************/
6 1.1.1.2.4.2 rmind
7 1.1.1.2.4.2 rmind /*
8 1.1.1.2.4.2 rmind * Copyright (C) 2000 - 2011, Intel Corp.
9 1.1.1.2.4.2 rmind * All rights reserved.
10 1.1.1.2.4.2 rmind *
11 1.1.1.2.4.2 rmind * Redistribution and use in source and binary forms, with or without
12 1.1.1.2.4.2 rmind * modification, are permitted provided that the following conditions
13 1.1.1.2.4.2 rmind * are met:
14 1.1.1.2.4.2 rmind * 1. Redistributions of source code must retain the above copyright
15 1.1.1.2.4.2 rmind * notice, this list of conditions, and the following disclaimer,
16 1.1.1.2.4.2 rmind * without modification.
17 1.1.1.2.4.2 rmind * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 1.1.1.2.4.2 rmind * substantially similar to the "NO WARRANTY" disclaimer below
19 1.1.1.2.4.2 rmind * ("Disclaimer") and any redistribution must be conditioned upon
20 1.1.1.2.4.2 rmind * including a substantially similar Disclaimer requirement for further
21 1.1.1.2.4.2 rmind * binary redistribution.
22 1.1.1.2.4.2 rmind * 3. Neither the names of the above-listed copyright holders nor the names
23 1.1.1.2.4.2 rmind * of any contributors may be used to endorse or promote products derived
24 1.1.1.2.4.2 rmind * from this software without specific prior written permission.
25 1.1.1.2.4.2 rmind *
26 1.1.1.2.4.2 rmind * Alternatively, this software may be distributed under the terms of the
27 1.1.1.2.4.2 rmind * GNU General Public License ("GPL") version 2 as published by the Free
28 1.1.1.2.4.2 rmind * Software Foundation.
29 1.1.1.2.4.2 rmind *
30 1.1.1.2.4.2 rmind * NO WARRANTY
31 1.1.1.2.4.2 rmind * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 1.1.1.2.4.2 rmind * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 1.1.1.2.4.2 rmind * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 1.1.1.2.4.2 rmind * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 1.1.1.2.4.2 rmind * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 1.1.1.2.4.2 rmind * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 1.1.1.2.4.2 rmind * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 1.1.1.2.4.2 rmind * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 1.1.1.2.4.2 rmind * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 1.1.1.2.4.2 rmind * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 1.1.1.2.4.2 rmind * POSSIBILITY OF SUCH DAMAGES.
42 1.1.1.2.4.2 rmind */
43 1.1.1.2.4.2 rmind
44 1.1.1.2.4.2 rmind #ifndef __ACHWARE_H__
45 1.1.1.2.4.2 rmind #define __ACHWARE_H__
46 1.1.1.2.4.2 rmind
47 1.1.1.2.4.2 rmind
48 1.1.1.2.4.2 rmind /* Values for the _SST predefined method */
49 1.1.1.2.4.2 rmind
50 1.1.1.2.4.2 rmind #define ACPI_SST_INDICATOR_OFF 0
51 1.1.1.2.4.2 rmind #define ACPI_SST_WORKING 1
52 1.1.1.2.4.2 rmind #define ACPI_SST_WAKING 2
53 1.1.1.2.4.2 rmind #define ACPI_SST_SLEEPING 3
54 1.1.1.2.4.2 rmind #define ACPI_SST_SLEEP_CONTEXT 4
55 1.1.1.2.4.2 rmind
56 1.1.1.2.4.2 rmind
57 1.1.1.2.4.2 rmind /*
58 1.1.1.2.4.2 rmind * hwacpi - high level functions
59 1.1.1.2.4.2 rmind */
60 1.1.1.2.4.2 rmind ACPI_STATUS
61 1.1.1.2.4.2 rmind AcpiHwSetMode (
62 1.1.1.2.4.2 rmind UINT32 Mode);
63 1.1.1.2.4.2 rmind
64 1.1.1.2.4.2 rmind UINT32
65 1.1.1.2.4.2 rmind AcpiHwGetMode (
66 1.1.1.2.4.2 rmind void);
67 1.1.1.2.4.2 rmind
68 1.1.1.2.4.2 rmind
69 1.1.1.2.4.2 rmind /*
70 1.1.1.2.4.2 rmind * hwregs - ACPI Register I/O
71 1.1.1.2.4.2 rmind */
72 1.1.1.2.4.2 rmind ACPI_STATUS
73 1.1.1.2.4.2 rmind AcpiHwValidateRegister (
74 1.1.1.2.4.2 rmind ACPI_GENERIC_ADDRESS *Reg,
75 1.1.1.2.4.2 rmind UINT8 MaxBitWidth,
76 1.1.1.2.4.2 rmind UINT64 *Address);
77 1.1.1.2.4.2 rmind
78 1.1.1.2.4.2 rmind ACPI_STATUS
79 1.1.1.2.4.2 rmind AcpiHwRead (
80 1.1.1.2.4.2 rmind UINT32 *Value,
81 1.1.1.2.4.2 rmind ACPI_GENERIC_ADDRESS *Reg);
82 1.1.1.2.4.2 rmind
83 1.1.1.2.4.2 rmind ACPI_STATUS
84 1.1.1.2.4.2 rmind AcpiHwWrite (
85 1.1.1.2.4.2 rmind UINT32 Value,
86 1.1.1.2.4.2 rmind ACPI_GENERIC_ADDRESS *Reg);
87 1.1.1.2.4.2 rmind
88 1.1.1.2.4.2 rmind ACPI_BIT_REGISTER_INFO *
89 1.1.1.2.4.2 rmind AcpiHwGetBitRegisterInfo (
90 1.1.1.2.4.2 rmind UINT32 RegisterId);
91 1.1.1.2.4.2 rmind
92 1.1.1.2.4.2 rmind ACPI_STATUS
93 1.1.1.2.4.2 rmind AcpiHwWritePm1Control (
94 1.1.1.2.4.2 rmind UINT32 Pm1aControl,
95 1.1.1.2.4.2 rmind UINT32 Pm1bControl);
96 1.1.1.2.4.2 rmind
97 1.1.1.2.4.2 rmind ACPI_STATUS
98 1.1.1.2.4.2 rmind AcpiHwRegisterRead (
99 1.1.1.2.4.2 rmind UINT32 RegisterId,
100 1.1.1.2.4.2 rmind UINT32 *ReturnValue);
101 1.1.1.2.4.2 rmind
102 1.1.1.2.4.2 rmind ACPI_STATUS
103 1.1.1.2.4.2 rmind AcpiHwRegisterWrite (
104 1.1.1.2.4.2 rmind UINT32 RegisterId,
105 1.1.1.2.4.2 rmind UINT32 Value);
106 1.1.1.2.4.2 rmind
107 1.1.1.2.4.2 rmind ACPI_STATUS
108 1.1.1.2.4.2 rmind AcpiHwClearAcpiStatus (
109 1.1.1.2.4.2 rmind void);
110 1.1.1.2.4.2 rmind
111 1.1.1.2.4.2 rmind
112 1.1.1.2.4.2 rmind /*
113 1.1.1.2.4.2 rmind * hwvalid - Port I/O with validation
114 1.1.1.2.4.2 rmind */
115 1.1.1.2.4.2 rmind ACPI_STATUS
116 1.1.1.2.4.2 rmind AcpiHwReadPort (
117 1.1.1.2.4.2 rmind ACPI_IO_ADDRESS Address,
118 1.1.1.2.4.2 rmind UINT32 *Value,
119 1.1.1.2.4.2 rmind UINT32 Width);
120 1.1.1.2.4.2 rmind
121 1.1.1.2.4.2 rmind ACPI_STATUS
122 1.1.1.2.4.2 rmind AcpiHwWritePort (
123 1.1.1.2.4.2 rmind ACPI_IO_ADDRESS Address,
124 1.1.1.2.4.2 rmind UINT32 Value,
125 1.1.1.2.4.2 rmind UINT32 Width);
126 1.1.1.2.4.2 rmind
127 1.1.1.2.4.2 rmind
128 1.1.1.2.4.2 rmind /*
129 1.1.1.2.4.2 rmind * hwgpe - GPE support
130 1.1.1.2.4.2 rmind */
131 1.1.1.2.4.2 rmind UINT32
132 1.1.1.2.4.2 rmind AcpiHwGetGpeRegisterBit (
133 1.1.1.2.4.2 rmind ACPI_GPE_EVENT_INFO *GpeEventInfo,
134 1.1.1.2.4.2 rmind ACPI_GPE_REGISTER_INFO *GpeRegisterInfo);
135 1.1.1.2.4.2 rmind
136 1.1.1.2.4.2 rmind ACPI_STATUS
137 1.1.1.2.4.2 rmind AcpiHwLowSetGpe (
138 1.1.1.2.4.2 rmind ACPI_GPE_EVENT_INFO *GpeEventInfo,
139 1.1.1.2.4.2 rmind UINT32 Action);
140 1.1.1.2.4.2 rmind
141 1.1.1.2.4.2 rmind ACPI_STATUS
142 1.1.1.2.4.2 rmind AcpiHwDisableGpeBlock (
143 1.1.1.2.4.2 rmind ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
144 1.1.1.2.4.2 rmind ACPI_GPE_BLOCK_INFO *GpeBlock,
145 1.1.1.2.4.2 rmind void *Context);
146 1.1.1.2.4.2 rmind
147 1.1.1.2.4.2 rmind ACPI_STATUS
148 1.1.1.2.4.2 rmind AcpiHwClearGpe (
149 1.1.1.2.4.2 rmind ACPI_GPE_EVENT_INFO *GpeEventInfo);
150 1.1.1.2.4.2 rmind
151 1.1.1.2.4.2 rmind ACPI_STATUS
152 1.1.1.2.4.2 rmind AcpiHwClearGpeBlock (
153 1.1.1.2.4.2 rmind ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
154 1.1.1.2.4.2 rmind ACPI_GPE_BLOCK_INFO *GpeBlock,
155 1.1.1.2.4.2 rmind void *Context);
156 1.1.1.2.4.2 rmind
157 1.1.1.2.4.2 rmind ACPI_STATUS
158 1.1.1.2.4.2 rmind AcpiHwGetGpeStatus (
159 1.1.1.2.4.2 rmind ACPI_GPE_EVENT_INFO *GpeEventInfo,
160 1.1.1.2.4.2 rmind ACPI_EVENT_STATUS *EventStatus);
161 1.1.1.2.4.2 rmind
162 1.1.1.2.4.2 rmind ACPI_STATUS
163 1.1.1.2.4.2 rmind AcpiHwDisableAllGpes (
164 1.1.1.2.4.2 rmind void);
165 1.1.1.2.4.2 rmind
166 1.1.1.2.4.2 rmind ACPI_STATUS
167 1.1.1.2.4.2 rmind AcpiHwEnableAllRuntimeGpes (
168 1.1.1.2.4.2 rmind void);
169 1.1.1.2.4.2 rmind
170 1.1.1.2.4.2 rmind ACPI_STATUS
171 1.1.1.2.4.2 rmind AcpiHwEnableAllWakeupGpes (
172 1.1.1.2.4.2 rmind void);
173 1.1.1.2.4.2 rmind
174 1.1.1.2.4.2 rmind ACPI_STATUS
175 1.1.1.2.4.2 rmind AcpiHwEnableRuntimeGpeBlock (
176 1.1.1.2.4.2 rmind ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
177 1.1.1.2.4.2 rmind ACPI_GPE_BLOCK_INFO *GpeBlock,
178 1.1.1.2.4.2 rmind void *Context);
179 1.1.1.2.4.2 rmind
180 1.1.1.2.4.2 rmind
181 1.1.1.2.4.2 rmind /*
182 1.1.1.2.4.2 rmind * hwpci - PCI configuration support
183 1.1.1.2.4.2 rmind */
184 1.1.1.2.4.2 rmind ACPI_STATUS
185 1.1.1.2.4.2 rmind AcpiHwDerivePciId (
186 1.1.1.2.4.2 rmind ACPI_PCI_ID *PciId,
187 1.1.1.2.4.2 rmind ACPI_HANDLE RootPciDevice,
188 1.1.1.2.4.2 rmind ACPI_HANDLE PciRegion);
189 1.1.1.2.4.2 rmind
190 1.1.1.2.4.2 rmind
191 1.1.1.2.4.2 rmind /*
192 1.1.1.2.4.2 rmind * hwtimer - ACPI Timer prototypes
193 1.1.1.2.4.2 rmind */
194 1.1.1.2.4.2 rmind ACPI_STATUS
195 1.1.1.2.4.2 rmind AcpiGetTimerResolution (
196 1.1.1.2.4.2 rmind UINT32 *Resolution);
197 1.1.1.2.4.2 rmind
198 1.1.1.2.4.2 rmind ACPI_STATUS
199 1.1.1.2.4.2 rmind AcpiGetTimer (
200 1.1.1.2.4.2 rmind UINT32 *Ticks);
201 1.1.1.2.4.2 rmind
202 1.1.1.2.4.2 rmind ACPI_STATUS
203 1.1.1.2.4.2 rmind AcpiGetTimerDuration (
204 1.1.1.2.4.2 rmind UINT32 StartTicks,
205 1.1.1.2.4.2 rmind UINT32 EndTicks,
206 1.1.1.2.4.2 rmind UINT32 *TimeElapsed);
207 1.1.1.2.4.2 rmind
208 1.1.1.2.4.2 rmind
209 1.1.1.2.4.2 rmind #endif /* __ACHWARE_H__ */
210