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