]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Library/SerialPortLib/PlatformSerialPortLib.h
8c9c9a810fde68061f10c9147ac5bdc56eb3ef6e
[mirror_edk2.git] / Vlv2TbltDevicePkg / Library / SerialPortLib / PlatformSerialPortLib.h
1 /** @file
2 Header file of Serial port hardware definition.
3
4 Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
5
6 This program and the accompanying materials are licensed and made available under
7 the terms and conditions of the BSD License that accompanies this distribution.
8 The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef __PLATFORM_SERIAL_PORT_LIB_H_
17 #define __PLATFORM_SERIAL_PORT_LIB_H_
18
19 #include <Base.h>
20 #include <Library/BaseLib.h>
21 #include <Library/IoLib.h>
22 #include <Library/PcdLib.h>
23 #include <Library/SerialPortLib.h>
24
25 //
26 // UART Register Offsets
27 //
28 #define BAUD_LOW_OFFSET 0x00
29 #define BAUD_HIGH_OFFSET 0x01
30 #define IER_OFFSET 0x01
31 #define LCR_SHADOW_OFFSET 0x01
32 #define FCR_SHADOW_OFFSET 0x02
33 #define IR_CONTROL_OFFSET 0x02
34 #define FCR_OFFSET 0x02
35 #define EIR_OFFSET 0x02
36 #define BSR_OFFSET 0x03
37 #define LCR_OFFSET 0x03
38 #define MCR_OFFSET 0x04
39 #define LSR_OFFSET 0x05
40 #define MSR_OFFSET 0x06
41
42 //
43 // UART Register Bit Defines
44 //
45 #define LSR_TXRDY 0x20
46 #define LSR_RXDA 0x01
47 #define DLAB 0x01
48
49 #define UART_DATA 8
50 #define UART_STOP 1
51 #define UART_PARITY 0
52 #define UART_BREAK_SET 0
53
54 VOID
55 InitializeSio (
56 VOID
57 );
58
59 #endif