Redefine SPEC and Release Version to 0x20000
[mirror_edk2.git] / EdkModulePkg / Bus / Pci / CirrusLogic / Dxe / CirrusLogic5430.h
1 /** @file
2 Cirrus Logic 5430 Controller Driver
3
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 **/
14
15 //
16 // Cirrus Logic 5430 Controller Driver
17 //
18
19 #ifndef _CIRRUS_LOGIC_5430_H_
20 #define _CIRRUS_LOGIC_5430_H_
21
22
23 #include <IndustryStandard/pci22.h>
24 //
25 // Cirrus Logic 5430 PCI Configuration Header values
26 //
27 #define CIRRUS_LOGIC_VENDOR_ID 0x1013
28 #define CIRRUS_LOGIC_5430_DEVICE_ID 0x00a8
29 #define CIRRUS_LOGIC_5430_ALTERNATE_DEVICE_ID 0x00a0
30 #define CIRRUS_LOGIC_5446_DEVICE_ID 0x00b8
31
32 //
33 // Cirrus Logic Graphical Mode Data
34 //
35 #define CIRRUS_LOGIC_5430_UGA_DRAW_MODE_COUNT 3
36
37 typedef struct {
38 UINT32 HorizontalResolution;
39 UINT32 VerticalResolution;
40 UINT32 ColorDepth;
41 UINT32 RefreshRate;
42 } CIRRUS_LOGIC_5430_UGA_DRAW_MODE_DATA;
43
44 //
45 // Cirrus Logic 5440 Private Data Structure
46 //
47 #define CIRRUS_LOGIC_5430_PRIVATE_DATA_SIGNATURE EFI_SIGNATURE_32 ('C', 'L', '5', '4')
48
49 typedef struct {
50 UINT64 Signature;
51 EFI_HANDLE Handle;
52 EFI_PCI_IO_PROTOCOL *PciIo;
53 EFI_UGA_DRAW_PROTOCOL UgaDraw;
54
55 //
56 // UGA Draw Private Data
57 //
58 BOOLEAN HardwareNeedsStarting;
59 UINTN CurrentMode;
60 UINTN MaxMode;
61 CIRRUS_LOGIC_5430_UGA_DRAW_MODE_DATA ModeData[CIRRUS_LOGIC_5430_UGA_DRAW_MODE_COUNT];
62 UINT8 *LineBuffer;
63 } CIRRUS_LOGIC_5430_PRIVATE_DATA;
64
65 #define CIRRUS_LOGIC_5430_PRIVATE_DATA_FROM_UGA_DRAW_THIS(a) \
66 CR(a, CIRRUS_LOGIC_5430_PRIVATE_DATA, UgaDraw, CIRRUS_LOGIC_5430_PRIVATE_DATA_SIGNATURE)
67
68 //
69 // Global Variables
70 //
71 extern EFI_DRIVER_BINDING_PROTOCOL gCirrusLogic5430DriverBinding;
72 extern EFI_COMPONENT_NAME_PROTOCOL gCirrusLogic5430ComponentName;
73
74 //
75 // Io Registers defined by VGA
76 //
77 #define CRTC_ADDRESS_REGISTER 0x3d4
78 #define CRTC_DATA_REGISTER 0x3d5
79 #define SEQ_ADDRESS_REGISTER 0x3c4
80 #define SEQ_DATA_REGISTER 0x3c5
81 #define GRAPH_ADDRESS_REGISTER 0x3ce
82 #define GRAPH_DATA_REGISTER 0x3cf
83 #define ATT_ADDRESS_REGISTER 0x3c0
84 #define MISC_OUTPUT_REGISTER 0x3c2
85 #define INPUT_STATUS_1_REGISTER 0x3da
86 #define DAC_PIXEL_MASK_REGISTER 0x3c6
87 #define PALETTE_INDEX_REGISTER 0x3c8
88 #define PALETTE_DATA_REGISTER 0x3c9
89
90 //
91 // UGA Draw Hardware abstraction internal worker functions
92 //
93 /**
94 TODO: Add function description
95
96 @param Private TODO: add argument description
97
98 TODO: add return values
99
100 **/
101 EFI_STATUS
102 CirrusLogic5430UgaDrawConstructor (
103 CIRRUS_LOGIC_5430_PRIVATE_DATA *Private
104 )
105 ;
106
107 /**
108 TODO: Add function description
109
110 @param Private TODO: add argument description
111
112 TODO: add return values
113
114 **/
115 EFI_STATUS
116 CirrusLogic5430UgaDrawDestructor (
117 CIRRUS_LOGIC_5430_PRIVATE_DATA *Private
118 )
119 ;
120
121 //
122 // EFI 1.1 driver model prototypes for Cirrus Logic 5430 UGA Draw
123 //
124 /**
125 TODO: Add function description
126
127 @param ImageHandle TODO: add argument description
128 @param SystemTable TODO: add argument description
129
130 TODO: add return values
131
132 **/
133 EFI_STATUS
134 EFIAPI
135 CirrusLogic5430DriverEntryPoint (
136 IN EFI_HANDLE ImageHandle,
137 IN EFI_SYSTEM_TABLE *SystemTable
138 )
139 ;
140
141 //
142 // EFI_DRIVER_BINDING_PROTOCOL Protocol Interface
143 //
144 /**
145 TODO: Add function description
146
147 @param This TODO: add argument description
148 @param Controller TODO: add argument description
149 @param RemainingDevicePath TODO: add argument description
150
151 TODO: add return values
152
153 **/
154 EFI_STATUS
155 EFIAPI
156 CirrusLogic5430ControllerDriverSupported (
157 IN EFI_DRIVER_BINDING_PROTOCOL *This,
158 IN EFI_HANDLE Controller,
159 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
160 )
161 ;
162
163 /**
164 TODO: Add function description
165
166 @param This TODO: add argument description
167 @param Controller TODO: add argument description
168 @param RemainingDevicePath TODO: add argument description
169
170 TODO: add return values
171
172 **/
173 EFI_STATUS
174 EFIAPI
175 CirrusLogic5430ControllerDriverStart (
176 IN EFI_DRIVER_BINDING_PROTOCOL *This,
177 IN EFI_HANDLE Controller,
178 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
179 )
180 ;
181
182 /**
183 TODO: Add function description
184
185 @param This TODO: add argument description
186 @param Controller TODO: add argument description
187 @param NumberOfChildren TODO: add argument description
188 @param ChildHandleBuffer TODO: add argument description
189
190 TODO: add return values
191
192 **/
193 EFI_STATUS
194 EFIAPI
195 CirrusLogic5430ControllerDriverStop (
196 IN EFI_DRIVER_BINDING_PROTOCOL *This,
197 IN EFI_HANDLE Controller,
198 IN UINTN NumberOfChildren,
199 IN EFI_HANDLE *ChildHandleBuffer
200 )
201 ;
202
203 #endif