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