]> git.proxmox.com Git - mirror_edk2.git/blame - Vlv2TbltDevicePkg/Wpce791/LpcDriver.h
MdeModulePkg/PciBus: Remove unused fields in PCI_BAR
[mirror_edk2.git] / Vlv2TbltDevicePkg / Wpce791 / LpcDriver.h
CommitLineData
3cbfba02
DW
1/*++\r
2\r
3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r
4 \r\r
5 This program and the accompanying materials are licensed and made available under\r\r
6 the terms and conditions of the BSD License that accompanies this distribution. \r\r
7 The full text of the license may be found at \r\r
8 http://opensource.org/licenses/bsd-license.php. \r\r
9 \r\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r\r
12 \r\r
13\r
14Module Name:\r
15\r
16 LpcDriver.h\r
17\r
18Abstract:\r
19\r
20 EFI Lpc Driver for a Generic PC Platform\r
21\r
22\r
23\r
24--*/\r
25\r
26#ifndef _LPC_DRIVER_H\r
27#define _LPC_DRIVER_H\r
28\r
29 #include "LpcSio.h"\r
30 #include "LpcIsaAcpi.h"\r
31\r
32#include "Protocol/IsaAcpi.h"\r
33#include "Protocol/PciIo.h"\r
34#include "Protocol/DriverBinding.h"\r
35#include "Library/UefiBootServicesTableLib.h"\r
36#include "IsaAcpiDxe/PcatIsaAcpi.h"\r
37#include "IndustryStandard/Pci22.h"\r
38#include "Protocol/LpcWpce791Policy.h"\r
39\r
40#include <Library/DebugLib.h>\r
41\r
42#define ICH_LPC_BRIDGE_BUS_DEV_FUNC 0x1F0000\r
43\r
44//\r
45// LPC device private data structure\r
46//\r
47//#define LPC_DEV_SIGNATURE 'W87X'\r
48#define LPC_DEV_SIGNATURE SIGNATURE_32('X', '7', '8', 'W') //'W87X'\r
49#define EFI_WPCE791_PS2_KEYBOARD_ENABLE 0x01\r
50#define EFI_WPCE791_PS2_KEYBOARD_DISABLE 0x00\r
51\r
52#define EFI_WPCE791_PS2_MOUSE_ENABLE 0x01\r
53#define EFI_WPCE791_PS2_MOUSE_DISABLE 0x00\r
54\r
55\r
56\r
57typedef struct {\r
58 UINTN Signature;\r
59 EFI_HANDLE Handle;\r
60 EFI_ISA_ACPI_PROTOCOL IsaAcpi;\r
61 EFI_PCI_IO_PROTOCOL *PciIo;\r
62\r
63} LPC_DEV;\r
64\r
65#define LPC_ISA_ACPI_FROM_THIS(a) BASE_CR (a, LPC_DEV, IsaAcpi)\r
66\r
67//\r
68// Driver entry point\r
69//\r
70EFI_STATUS\r
71EFIAPI\r
72LpcDriverEntryPoint (\r
73 IN EFI_HANDLE ImageHandle,\r
74 IN EFI_SYSTEM_TABLE *SystemTable\r
75 );\r
76\r
77//\r
78// Prototypes for Driver model protocol interface\r
79//\r
80EFI_STATUS\r
81EFIAPI\r
82LpcDriverSupported (\r
83 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
84 IN EFI_HANDLE Controller,\r
85 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
86 );\r
87\r
88EFI_STATUS\r
89EFIAPI\r
90LpcDriverStart (\r
91 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
92 IN EFI_HANDLE Controller,\r
93 IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath\r
94 );\r
95\r
96EFI_STATUS\r
97EFIAPI\r
98LpcDriverStop (\r
99 IN EFI_DRIVER_BINDING_PROTOCOL *This,\r
100 IN EFI_HANDLE Controller,\r
101 IN UINTN NumberOfChildren,\r
102 IN EFI_HANDLE *ChildHandleBuffer\r
103 );\r
104\r
105VOID\r
106LpcIoRead8 (\r
107 IN UINT16 Port,\r
108 OUT UINT8 *Data\r
109 );\r
110\r
111VOID\r
112LpcIoWrite8 (\r
113 IN UINT16 Port,\r
114 IN UINT8 Data\r
115 );\r
116\r
117#endif\r