Fix capitalization.
[mirror_edk2.git] / EdkModulePkg / Bus / Pci / CirrusLogic / Dxe / CirrusLogic5430.h
1 /*++
2
3 Copyright (c) 2006, 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 Module Name:
13
14 CirrusLogic5430.h
15
16 Abstract:
17
18 Cirrus Logic 5430 Controller Driver
19
20 Revision History
21
22 --*/
23
24 //
25 // Cirrus Logic 5430 Controller Driver
26 //
27
28 #ifndef _CIRRUS_LOGIC_5430_H_
29 #define _CIRRUS_LOGIC_5430_H_
30
31
32 #include <IndustryStandard/pci22.h>
33 //
34 // Cirrus Logic 5430 PCI Configuration Header values
35 //
36 #define CIRRUS_LOGIC_VENDOR_ID 0x1013
37 #define CIRRUS_LOGIC_5430_DEVICE_ID 0x00a8
38 #define CIRRUS_LOGIC_5430_ALTERNATE_DEVICE_ID 0x00a0
39 #define CIRRUS_LOGIC_5446_DEVICE_ID 0x00b8
40
41 //
42 // Cirrus Logic Graphical Mode Data
43 //
44 #define CIRRUS_LOGIC_5430_UGA_DRAW_MODE_COUNT 3
45
46 typedef struct {
47 UINT32 HorizontalResolution;
48 UINT32 VerticalResolution;
49 UINT32 ColorDepth;
50 UINT32 RefreshRate;
51 } CIRRUS_LOGIC_5430_UGA_DRAW_MODE_DATA;
52
53 //
54 // Cirrus Logic 5440 Private Data Structure
55 //
56 #define CIRRUS_LOGIC_5430_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('C', 'L', '5', '4')
57
58 typedef struct {
59 UINT64 Signature;
60 EFI_HANDLE Handle;
61 EFI_PCI_IO_PROTOCOL *PciIo;
62 EFI_UGA_DRAW_PROTOCOL UgaDraw;
63
64 //
65 // UGA Draw Private Data
66 //
67 BOOLEAN HardwareNeedsStarting;
68 UINTN CurrentMode;
69 UINTN MaxMode;
70 CIRRUS_LOGIC_5430_UGA_DRAW_MODE_DATA ModeData[CIRRUS_LOGIC_5430_UGA_DRAW_MODE_COUNT];
71 UINT8 *LineBuffer;
72 } CIRRUS_LOGIC_5430_PRIVATE_DATA;
73
74 #define CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_UGA_DRAW_THIS(a) \
75 CR(a, CIRRUS_LOGIC_5430_PRIVATE_DATA, UgaDraw, CIRRUS_LOGIC_5430_PRIVATE_DATA_SIGNATURE)
76
77 //
78 // Global Variables
79 //
80 extern EFI_DRIVER_BINDING_PROTOCOL gCirrusLogic5430DriverBinding;
81 extern EFI_COMPONENT_NAME_PROTOCOL gCirrusLogic5430ComponentName;
82
83 //
84 // Io Registers defined by VGA
85 //
86 #define CRTC_ADDRESS_REGISTER 0x3d4
87 #define CRTC_DATA_REGISTER 0x3d5
88 #define SEQ_ADDRESS_REGISTER 0x3c4
89 #define SEQ_DATA_REGISTER 0x3c5
90 #define GRAPH_ADDRESS_REGISTER 0x3ce
91 #define GRAPH_DATA_REGISTER 0x3cf
92 #define ATT_ADDRESS_REGISTER 0x3c0
93 #define MISC_OUTPUT_REGISTER 0x3c2
94 #define INPUT_STATUS_1_REGISTER 0x3da
95 #define DAC_PIXEL_MASK_REGISTER 0x3c6
96 #define PALETTE_INDEX_REGISTER 0x3c8
97 #define PALETTE_DATA_REGISTER 0x3c9
98
99 //
100 // UGA Draw Hardware abstraction internal worker functions
101 //
102 EFI_STATUS
103 CirrusLogic5430UgaDrawConstructor (
104 CIRRUS_LOGIC_5430_PRIVATE_DATA *Private
105 )
106 /*++
107
108 Routine Description:
109
110 TODO: Add function description
111
112 Arguments:
113
114 Private - TODO: add argument description
115
116 Returns:
117
118 TODO: add return values
119
120 --*/
121 ;
122
123 EFI_STATUS
124 CirrusLogic5430UgaDrawDestructor (
125 CIRRUS_LOGIC_5430_PRIVATE_DATA *Private
126 )
127 /*++
128
129 Routine Description:
130
131 TODO: Add function description
132
133 Arguments:
134
135 Private - TODO: add argument description
136
137 Returns:
138
139 TODO: add return values
140
141 --*/
142 ;
143
144 //
145 // EFI 1.1 driver model prototypes for Cirrus Logic 5430 UGA Draw
146 //
147 EFI_STATUS
148 EFIAPI
149 CirrusLogic5430DriverEntryPoint (
150 IN EFI_HANDLE ImageHandle,
151 IN EFI_SYSTEM_TABLE *SystemTable
152 )
153 /*++
154
155 Routine Description:
156
157 TODO: Add function description
158
159 Arguments:
160
161 ImageHandle - TODO: add argument description
162 SystemTable - TODO: add argument description
163
164 Returns:
165
166 TODO: add return values
167
168 --*/
169 ;
170
171 //
172 // EFI_DRIVER_BINDING_PROTOCOL Protocol Interface
173 //
174 EFI_STATUS
175 EFIAPI
176 CirrusLogic5430ControllerDriverSupported (
177 IN EFI_DRIVER_BINDING_PROTOCOL *This,
178 IN EFI_HANDLE Controller,
179 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
180 )
181 /*++
182
183 Routine Description:
184
185 TODO: Add function description
186
187 Arguments:
188
189 This - TODO: add argument description
190 Controller - TODO: add argument description
191 RemainingDevicePath - TODO: add argument description
192
193 Returns:
194
195 TODO: add return values
196
197 --*/
198 ;
199
200 EFI_STATUS
201 EFIAPI
202 CirrusLogic5430ControllerDriverStart (
203 IN EFI_DRIVER_BINDING_PROTOCOL *This,
204 IN EFI_HANDLE Controller,
205 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
206 )
207 /*++
208
209 Routine Description:
210
211 TODO: Add function description
212
213 Arguments:
214
215 This - TODO: add argument description
216 Controller - TODO: add argument description
217 RemainingDevicePath - TODO: add argument description
218
219 Returns:
220
221 TODO: add return values
222
223 --*/
224 ;
225
226 EFI_STATUS
227 EFIAPI
228 CirrusLogic5430ControllerDriverStop (
229 IN EFI_DRIVER_BINDING_PROTOCOL *This,
230 IN EFI_HANDLE Controller,
231 IN UINTN NumberOfChildren,
232 IN EFI_HANDLE *ChildHandleBuffer
233 )
234 /*++
235
236 Routine Description:
237
238 TODO: Add function description
239
240 Arguments:
241
242 This - TODO: add argument description
243 Controller - TODO: add argument description
244 NumberOfChildren - TODO: add argument description
245 ChildHandleBuffer - TODO: add argument description
246
247 Returns:
248
249 TODO: add return values
250
251 --*/
252 ;
253
254 #endif