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