]> git.proxmox.com Git - mirror_edk2.git/blob - DuetPkg/IsaAcpiDxe/PcatIsaAcpi.h
Change _CR() to BASE_CR() to follow naming convention
[mirror_edk2.git] / DuetPkg / IsaAcpiDxe / PcatIsaAcpi.h
1 /*++
2
3 Copyright (c) 2006 - 2007, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12
13 Module Name:
14
15 PcatIsaAcpi.h
16
17 Abstract:
18
19 EFI PCAT ISA ACPI Driver for a Generic PC Platform
20
21 Revision History
22
23 --*/
24
25 #ifndef _PCAT_ISA_ACPI_H_
26 #define _PCAT_ISA_ACPI_H_
27
28 #include <PiDxe.h>
29
30 #include <IndustryStandard/Pci.h>
31
32 #include <Protocol/DevicePath.h>
33 #include <Protocol/PciIo.h>
34 #include <Protocol/IsaIo.h>
35 #include <Protocol/DriverBinding.h>
36 #include <Protocol/ComponentName.h>
37 #include <Protocol/ComponentName2.h>
38
39
40 #include <Library/UefiLib.h>
41 #include <Library/UefiBootServicesTableLib.h>
42
43 #include <Protocol/IsaAcpi.h>
44 //
45 // PCAT ISA ACPI device private data structure
46 //
47 #define PCAT_ISA_ACPI_DEV_SIGNATURE EFI_SIGNATURE_32('L','P','C','D')
48
49 typedef struct {
50 UINTN Signature;
51 EFI_HANDLE Handle;
52 EFI_ISA_ACPI_PROTOCOL IsaAcpi;
53 EFI_PCI_IO_PROTOCOL *PciIo;
54 } PCAT_ISA_ACPI_DEV;
55
56 #define PCAT_ISA_ACPI_DEV_FROM_THIS(a) BASE_CR(a, PCAT_ISA_ACPI_DEV, IsaAcpi)
57
58 //
59 // Global Variables
60 //
61 extern EFI_DRIVER_BINDING_PROTOCOL gPcatIsaAcpiDriverBinding;
62
63 extern EFI_COMPONENT_NAME2_PROTOCOL gPcatIsaAcpiComponentName2;
64
65 extern EFI_COMPONENT_NAME_PROTOCOL gPcatIsaAcpiComponentName;
66
67
68 //
69 // Prototypes for Driver model protocol interface
70 //
71 EFI_STATUS
72 EFIAPI
73 PcatIsaAcpiDriverBindingSupported (
74 IN EFI_DRIVER_BINDING_PROTOCOL *This,
75 IN EFI_HANDLE Controller,
76 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
77 );
78
79 EFI_STATUS
80 EFIAPI
81 PcatIsaAcpiDriverBindingStart (
82 IN EFI_DRIVER_BINDING_PROTOCOL *This,
83 IN EFI_HANDLE Controller,
84 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
85 );
86
87 EFI_STATUS
88 EFIAPI
89 PcatIsaAcpiDriverBindingStop (
90 IN EFI_DRIVER_BINDING_PROTOCOL *This,
91 IN EFI_HANDLE Controller,
92 IN UINTN NumberOfChildren,
93 IN EFI_HANDLE *ChildHandleBuffer
94 );
95
96 //
97 // Prototypes for the ISA ACPI protocol interface
98 //
99 EFI_STATUS
100 EFIAPI
101 IsaDeviceEnumerate (
102 IN EFI_ISA_ACPI_PROTOCOL *This,
103 OUT EFI_ISA_ACPI_DEVICE_ID **Device
104 );
105
106 EFI_STATUS
107 EFIAPI
108 IsaDeviceSetPower (
109 IN EFI_ISA_ACPI_PROTOCOL *This,
110 IN EFI_ISA_ACPI_DEVICE_ID *Device,
111 IN BOOLEAN OnOff
112 );
113
114 EFI_STATUS
115 EFIAPI
116 IsaGetCurrentResource (
117 IN EFI_ISA_ACPI_PROTOCOL *This,
118 IN EFI_ISA_ACPI_DEVICE_ID *Device,
119 OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList
120 );
121
122 EFI_STATUS
123 EFIAPI
124 IsaGetPossibleResource (
125 IN EFI_ISA_ACPI_PROTOCOL *This,
126 IN EFI_ISA_ACPI_DEVICE_ID *Device,
127 OUT EFI_ISA_ACPI_RESOURCE_LIST **ResourceList
128 );
129
130 EFI_STATUS
131 EFIAPI
132 IsaSetResource (
133 IN EFI_ISA_ACPI_PROTOCOL *This,
134 IN EFI_ISA_ACPI_DEVICE_ID *Device,
135 IN EFI_ISA_ACPI_RESOURCE_LIST *ResourceList
136 );
137
138 EFI_STATUS
139 EFIAPI
140 IsaEnableDevice (
141 IN EFI_ISA_ACPI_PROTOCOL *This,
142 IN EFI_ISA_ACPI_DEVICE_ID *Device,
143 IN BOOLEAN Enable
144 );
145
146 EFI_STATUS
147 EFIAPI
148 IsaInitDevice (
149 IN EFI_ISA_ACPI_PROTOCOL *This,
150 IN EFI_ISA_ACPI_DEVICE_ID *Device
151 );
152
153 EFI_STATUS
154 EFIAPI
155 IsaInterfaceInit (
156 IN EFI_ISA_ACPI_PROTOCOL *This
157 );
158
159 #endif