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