1 /** @file
2   Header file of Serial port hardware definition.
3 
4   Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
5 
6 
7   This program and the accompanying materials are licensed and made available under
8 
9   the terms and conditions of the BSD License that accompanies this distribution.
10 
11   The full text of the license may be found at
12 
13   http://opensource.org/licenses/bsd-license.php.
14 
15 
16 
17   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
18 
19   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 
21 
22 
23   This software and associated documentation
24   (if any) is furnished under a license and may only be used or
25   copied in accordance with the terms of the license.  Except as
26   permitted by such license, no part of this software or
27   documentation may be reproduced, stored in a retrieval system, or
28   transmitted in any form or by any means without the express written
29   consent of Intel Corporation.
30 
31   Module Name:  PlatformSerialPortLib.h
32 
33 **/
34 
35 #ifndef __PLATFORM_SERIAL_PORT_LIB_H_
36 #define __PLATFORM_SERIAL_PORT_LIB_H_
37 
38 #include <Base.h>
39 #include <Library/BaseLib.h>
40 #include <Library/IoLib.h>
41 #include <Library/PcdLib.h>
42 #include <Library/SerialPortLib.h>
43 
44 //
45 // UART Register Offsets
46 //
47 #define BAUD_LOW_OFFSET   0x00
48 #define BAUD_HIGH_OFFSET  0x01
49 #define IER_OFFSET        0x01
50 #define LCR_SHADOW_OFFSET 0x01
51 #define FCR_SHADOW_OFFSET 0x02
52 #define IR_CONTROL_OFFSET 0x02
53 #define FCR_OFFSET        0x02
54 #define EIR_OFFSET        0x02
55 #define BSR_OFFSET        0x03
56 #define LCR_OFFSET        0x03
57 #define MCR_OFFSET        0x04
58 #define LSR_OFFSET        0x05
59 #define MSR_OFFSET        0x06
60 
61 //
62 // UART Register Bit Defines
63 //
64 #define LSR_TXRDY 0x20
65 #define LSR_RXDA  0x01
66 #define DLAB      0x01
67 
68 #define UART_DATA    8
69 #define UART_STOP    1
70 #define UART_PARITY  0
71 #define UART_BREAK_SET  0
72 
73 VOID
74 InitializeSio (
75   VOID
76   );
77 
78 #endif
79