]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Library/SerialPortLib/PlatformSerialPortLib.h
Upload BSD-licensed Vlv2TbltDevicePkg and Vlv2DeviceRefCodePkg to
[mirror_edk2.git] / Vlv2TbltDevicePkg / Library / SerialPortLib / PlatformSerialPortLib.h
1 /** @file
2 Header file of Serial port hardware definition.
3
4 Copyright (c) 2006 - 2014, 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 This software and associated documentation
15 (if any) is furnished under a license and may only be used or
16 copied in accordance with the terms of the license. Except as
17 permitted by such license, no part of this software or
18 documentation may be reproduced, stored in a retrieval system, or
19 transmitted in any form or by any means without the express written
20 consent of Intel Corporation.
21
22 Module Name: PlatformSerialPortLib.h
23
24 **/
25
26 #ifndef __PLATFORM_SERIAL_PORT_LIB_H_
27 #define __PLATFORM_SERIAL_PORT_LIB_H_
28
29 #include <Base.h>
30 #include <Library/BaseLib.h>
31 #include <Library/IoLib.h>
32 #include <Library/PcdLib.h>
33 #include <Library/SerialPortLib.h>
34
35 //
36 // UART Register Offsets
37 //
38 #define BAUD_LOW_OFFSET 0x00
39 #define BAUD_HIGH_OFFSET 0x01
40 #define IER_OFFSET 0x01
41 #define LCR_SHADOW_OFFSET 0x01
42 #define FCR_SHADOW_OFFSET 0x02
43 #define IR_CONTROL_OFFSET 0x02
44 #define FCR_OFFSET 0x02
45 #define EIR_OFFSET 0x02
46 #define BSR_OFFSET 0x03
47 #define LCR_OFFSET 0x03
48 #define MCR_OFFSET 0x04
49 #define LSR_OFFSET 0x05
50 #define MSR_OFFSET 0x06
51
52 //
53 // UART Register Bit Defines
54 //
55 #define LSR_TXRDY 0x20
56 #define LSR_RXDA 0x01
57 #define DLAB 0x01
58
59 #define UART_DATA 8
60 #define UART_STOP 1
61 #define UART_PARITY 0
62 #define UART_BREAK_SET 0
63
64 VOID
65 InitializeSio (
66 VOID
67 );
68
69 #endif