]> git.proxmox.com Git - mirror_edk2.git/blame - PcAtChipsetPkg/IsaAcpiDxe/PcatIsaAcpi.h
Refine the file/function comments to follow doxygen format
[mirror_edk2.git] / PcAtChipsetPkg / IsaAcpiDxe / PcatIsaAcpi.h
CommitLineData
18c97f53 1/** @file\r
2 EFI PCAT ISA ACPI Driver for a Generic PC Platform\r
c69dd9df 3\r
18c97f53 4Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved. <BR>\r
5This program and the accompanying materials \r
c69dd9df 6are licensed and made available under the terms and conditions of the BSD License \r
7which accompanies this distribution. The full text of the license may be found at \r
8http://opensource.org/licenses/bsd-license.php \r
9 \r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
12\r
18c97f53 13**/\r
c69dd9df 14\r
15#ifndef _PCAT_ISA_ACPI_H_\r
16#define _PCAT_ISA_ACPI_H_\r
17\r
18#include <PiDxe.h>\r
19\r
20#include <IndustryStandard/Pci.h>\r
21\r
22#include <Protocol/DevicePath.h>\r
23#include <Protocol/PciIo.h>\r
24#include <Protocol/IsaIo.h>\r
25#include <Protocol/DriverBinding.h>\r
26#include <Protocol/ComponentName.h>\r
27#include <Protocol/ComponentName2.h>\r
28\r
29\r
30#include <Library/UefiLib.h>\r
31#include <Library/UefiBootServicesTableLib.h>\r
32\r
33#include <Protocol/IsaAcpi.h>\r
34//\r
35// PCAT ISA ACPI device private data structure\r
36//\r
eea53ce1 37#define PCAT_ISA_ACPI_DEV_SIGNATURE SIGNATURE_32('L','P','C','D')\r
c69dd9df 38\r
39typedef struct {\r
40 UINTN Signature;\r
41 EFI_HANDLE Handle; \r
42 EFI_ISA_ACPI_PROTOCOL IsaAcpi;\r
43 EFI_PCI_IO_PROTOCOL *PciIo;\r
44} PCAT_ISA_ACPI_DEV;\r
45\r
a75ff28a 46#define PCAT_ISA_ACPI_DEV_FROM_THIS(a) BASE_CR(a, PCAT_ISA_ACPI_DEV, IsaAcpi)\r
c69dd9df 47\r
48//\r
49// Global Variables\r
50//\r
51extern EFI_DRIVER_BINDING_PROTOCOL gPcatIsaAcpiDriverBinding;\r
52\r
53extern EFI_COMPONENT_NAME2_PROTOCOL gPcatIsaAcpiComponentName2;\r
54\r
55extern EFI_COMPONENT_NAME_PROTOCOL gPcatIsaAcpiComponentName;\r
56\r
57\r
58//\r
59// Prototypes for Driver model protocol interface\r
60//\r
18c97f53 61/**\r
62 ControllerDriver Protocol Method\r
63\r
64 @param This Driver Binding protocol instance pointer. \r
65 @param Controller Handle of device to test.\r
66 @param RemainingDevicePath Optional parameter use to pick a specific child\r
67 device to start.\r
68 @retval EFI_SUCCESS This driver supports this device.\r
69 @retval other This driver does not support this device.\r
70\r
71**/\r
c69dd9df 72EFI_STATUS\r
73EFIAPI\r
74PcatIsaAcpiDriverBindingSupported (\r
75 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
76 IN EFI_HANDLE Controller,\r
77 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
78 );\r
79\r
18c97f53 80/**\r
81 Install EFI_ISA_ACPI_PROTOCOL.\r
82\r
83 @param This Driver Binding protocol instance pointer.\r
84 @param ControllerHandle Handle of device to bind driver to.\r
85 @param RemainingDevicePath Optional parameter use to pick a specific child\r
86 device to start.\r
87\r
88 @retval EFI_SUCCESS This driver is added to ControllerHandle\r
89 @retval EFI_ALREADY_STARTED This driver is already running on ControllerHandle\r
90 @retval other This driver does not support this device\r
91**/\r
c69dd9df 92EFI_STATUS\r
93EFIAPI\r
94PcatIsaAcpiDriverBindingStart (\r
95 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
96 IN EFI_HANDLE Controller,\r
97 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
98 );\r
99\r
18c97f53 100/**\r
101 Stop this driver on ControllerHandle. Support stopping any child handles\r
102 created by this driver.\r
103\r
104 @param This Protocol instance pointer.\r
105 @param ControllerHandle Handle of device to stop driver on\r
106 @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of\r
107 children is zero stop the entire bus driver.\r
108 @param ChildHandleBuffer List of Child Handles to Stop.\r
109\r
110 @retval EFI_SUCCESS This driver is removed ControllerHandle\r
111 @retval other This driver was not removed from this device\r
112\r
113**/\r
c69dd9df 114EFI_STATUS\r
115EFIAPI\r
116PcatIsaAcpiDriverBindingStop (\r
117 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
118 IN EFI_HANDLE Controller,\r
119 IN UINTN NumberOfChildren,\r
120 IN EFI_HANDLE *ChildHandleBuffer\r
121 );\r
122\r
123//\r
124// Prototypes for the ISA ACPI protocol interface\r
125//\r
18c97f53 126/**\r
127 Enumerate the ISA devices on the ISA bus\r
128\r
129\r
130 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL\r
131 @param Device Point to device ID instance \r
132\r
133 @retval EFI_NOT_FOUND Can not found the next Isa device.\r
134 @retval EFI_SUCESS Success retrieve the next Isa device for enumration.\r
135\r
136**/\r
c69dd9df 137EFI_STATUS\r
138EFIAPI\r
139IsaDeviceEnumerate (\r
140 IN EFI_ISA_ACPI_PROTOCOL *This,\r
141 OUT EFI_ISA_ACPI_DEVICE_ID **Device\r
142 );\r
143\r
18c97f53 144/**\r
145 Set ISA device power\r
146\r
147\r
148 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL\r
149 @param Device Point to device ID instance \r
150 @param OnOff TRUE for setting isa device power on,\r
151 FALSE for setting isa device power off\r
152\r
153 @return EFI_SUCCESS Sucess to change power status for isa device.\r
154**/\r
c69dd9df 155EFI_STATUS\r
156EFIAPI\r
157IsaDeviceSetPower (\r
158 IN EFI_ISA_ACPI_PROTOCOL *This,\r
159 IN EFI_ISA_ACPI_DEVICE_ID *Device,\r
160 IN BOOLEAN OnOff\r
161 );\r
162 \r
18c97f53 163/**\r
164 Get current resource for the specific ISA device.\r
165\r
166 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL\r
167 @param Device Point to device ID instance \r
168 @param ResourceList On return, point to resources instances for given isa device\r
169\r
170 @retval EFI_NOT_FOUND Can not found the resource instance for given isa device\r
171 @retval EFI_SUCCESS Success to get resource instance for given isa device.\r
172**/\r
c69dd9df 173EFI_STATUS\r
174EFIAPI\r
175IsaGetCurrentResource (\r
176 IN EFI_ISA_ACPI_PROTOCOL *This,\r
177 IN EFI_ISA_ACPI_DEVICE_ID *Device,\r
178 OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList\r
179 );\r
180 \r
18c97f53 181/**\r
182 Get possible resource for the specific ISA device.\r
183 \r
184 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL\r
185 @param Device Point to device ID instance \r
186 @param ResourceList On return, point to resources instances for given isa device\r
187\r
188 @retval EFI_SUCCESS Success to get resource instance for given isa device.\r
189**/\r
c69dd9df 190EFI_STATUS\r
191EFIAPI\r
192IsaGetPossibleResource (\r
193 IN EFI_ISA_ACPI_PROTOCOL *This,\r
194 IN EFI_ISA_ACPI_DEVICE_ID *Device, \r
195 OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList\r
196 );\r
197 \r
18c97f53 198/**\r
199 Set resource for the specific ISA device.\r
200\r
201 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL\r
202 @param Device Point to device ID instance \r
203 @param ResourceList Point to resources instances for given isa device\r
204\r
205 @return EFI_SUCESS Success to set resource.\r
206\r
207**/\r
c69dd9df 208EFI_STATUS\r
209EFIAPI\r
210IsaSetResource (\r
211 IN EFI_ISA_ACPI_PROTOCOL *This,\r
212 IN EFI_ISA_ACPI_DEVICE_ID *Device,\r
213 IN EFI_ISA_ACPI_RESOURCE_LIST *ResourceList\r
214 );\r
215 \r
18c97f53 216/**\r
217 Enable/Disable the specific ISA device.\r
218\r
219 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL\r
220 @param Device Point to device ID instance \r
221 @param Enable Enable/Disable\r
222\r
223 @return EFI_SUCESS Success to enable/disable.\r
224\r
225**/\r
c69dd9df 226EFI_STATUS\r
227EFIAPI\r
228IsaEnableDevice (\r
229 IN EFI_ISA_ACPI_PROTOCOL *This,\r
230 IN EFI_ISA_ACPI_DEVICE_ID *Device,\r
231 IN BOOLEAN Enable\r
232 );\r
233\r
18c97f53 234/**\r
235 Initialize the specific ISA device.\r
236\r
237 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL\r
238 @param Device Point to device ID instance \r
239\r
240 @return EFI_SUCESS Success to initialize.\r
241\r
242**/\r
c69dd9df 243EFI_STATUS\r
244EFIAPI\r
245IsaInitDevice (\r
246 IN EFI_ISA_ACPI_PROTOCOL *This,\r
247 IN EFI_ISA_ACPI_DEVICE_ID *Device\r
248 );\r
249 \r
18c97f53 250/**\r
251 Initialize the ISA interface.\r
252\r
253 @param This Point to instance of EFI_ISA_ACPI_PROTOCOL\r
254\r
255 @return EFI_SUCESS Success to initialize ISA interface.\r
256\r
257**/\r
c69dd9df 258EFI_STATUS\r
259EFIAPI\r
260IsaInterfaceInit (\r
261 IN EFI_ISA_ACPI_PROTOCOL *This\r
262 ); \r
263\r
264#endif\r