]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Wpce791/LpcSio.h
52c1499e3d865f66bee0ff7c62b6b5e819f1d720
[mirror_edk2.git] / Vlv2TbltDevicePkg / Wpce791 / LpcSio.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 LpcSio.h
12
13 Abstract:
14
15 Lpc driver's sio interface
16
17
18
19 --*/
20
21 #ifndef _LPC_SIO_H
22 #define _LPC_SIO_H
23
24 #include "Protocol/PciRootBridgeIo.h"
25
26 #define VARSIOINSTALLED L"VarSIOProcotolInstalled"
27
28 //
29 // Port address
30 //
31 #define CONFIG_PORT 0x04E
32 #define INDEX_PORT 0x04E
33 #define DATA_PORT INDEX_PORT + 1
34
35 //
36 // Logical Device
37 //
38 #define SIO_COM 0x3
39 #define SIO_MSWC 0x4
40 #define SIO_MOUSE 0x5
41 #define SIO_KEYBOARD 0x6
42 #define SIO_SHM 0xF
43 #define SIO_PM1 0x11
44 #define SIO_PM2 0x12
45 #define SIO_PM3 0x17
46 #define SIO_ESHM 0x1D
47
48 //
49 // Global register
50 //
51 #define REG_LOGICAL_DEVICE 0x07
52 #define REG_DEVICE_ID 0x20
53 #define SIO_CONFIG_1 0x21
54 #define REG_CHIP_REV 0x24
55 #define SIO_CONFIG_5 0x25
56 #define SIO_CONFIG_6 0x26
57 #define REG_DEVICE_REV 0x27
58 #define SIO_CONFIG_9 0x29
59 #define SIO_CONFIG_D 0x2D
60
61 #define ACTIVATE 0x30
62 #define BASE_ADDRESS_HIGH 0x60
63 #define BASE_ADDRESS_LOW 0x61
64 #define BASE_ADDRESS_HIGH2 0x62
65 #define BASE_ADDRESS_LOW2 0x63
66 #define PRIMARY_INTERRUPT_SELECT 0x70
67 #define DMA_CHANNEL_SELECT 0x74
68
69 EFI_STATUS
70 InitializeLpcSio (
71 IN EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL *RootBridgeIo
72 );
73
74 //
75 // Prototypes for the sio internal function
76 //
77 //
78 // Internal function
79 //
80 VOID
81 LPCWPCE791SetDefault (
82 VOID
83 );
84
85 VOID
86 WriteRegisterAndSaveToScript (
87 IN UINT8 Index,
88 IN UINT8 Data
89 );
90
91 VOID
92 FloppyWriteProtect (
93 VOID
94 );
95
96 VOID
97 DisableLogicalDevice (
98 UINT8 DeviceId
99 );
100
101 #endif