Loading...
Searching...
No Matches
Go to the documentation of this file.
9#ifndef __PL011_UART_H__
10#define __PL011_UART_H__
12#define PL011_VARIANT_ZTE 1
15#if FixedPcdGet8 (PL011UartRegOffsetVariant) == PL011_VARIANT_ZTE
22#define UARTLCR_H 0x030
29#define UARTDMACR 0x050
38#define UARTLCR_H 0x02C
45#define UARTDMACR 0x048
54#define UART_DATA_ERROR_MASK 0x0F00
57#define UART_STATUS_ERROR_MASK 0x0F
60#if FixedPcdGet8 (PL011UartRegOffsetVariant) == PL011_VARIANT_ZTE
61#define PL011_UARTFR_RI (1 << 0)
62#define PL011_UARTFR_TXFE (1 << 7)
63#define PL011_UARTFR_RXFF (1 << 6)
64#define PL011_UARTFR_TXFF (1 << 5)
65#define PL011_UARTFR_RXFE (1 << 4)
66#define PL011_UARTFR_BUSY (1 << 8)
67#define PL011_UARTFR_DCD (1 << 2)
68#define PL011_UARTFR_DSR (1 << 3)
69#define PL011_UARTFR_CTS (1 << 1)
71#define PL011_UARTFR_RI (1 << 8)
72#define PL011_UARTFR_TXFE (1 << 7)
73#define PL011_UARTFR_RXFF (1 << 6)
74#define PL011_UARTFR_TXFF (1 << 5)
75#define PL011_UARTFR_RXFE (1 << 4)
76#define PL011_UARTFR_BUSY (1 << 3)
77#define PL011_UARTFR_DCD (1 << 2)
78#define PL011_UARTFR_DSR (1 << 1)
79#define PL011_UARTFR_CTS (1 << 0)
83#define UART_TX_EMPTY_FLAG_MASK PL011_UARTFR_TXFE
84#define UART_RX_FULL_FLAG_MASK PL011_UARTFR_RXFF
85#define UART_TX_FULL_FLAG_MASK PL011_UARTFR_TXFF
86#define UART_RX_EMPTY_FLAG_MASK PL011_UARTFR_RXFE
87#define UART_BUSY_FLAG_MASK PL011_UARTFR_BUSY
90#define PL011_UARTCR_CTSEN (1 << 15)
91#define PL011_UARTCR_RTSEN (1 << 14)
92#define PL011_UARTCR_RTS (1 << 11)
93#define PL011_UARTCR_DTR (1 << 10)
94#define PL011_UARTCR_RXE (1 << 9)
95#define PL011_UARTCR_TXE (1 << 8)
96#define PL011_UARTCR_LBE (1 << 7)
97#define PL011_UARTCR_UARTEN (1 << 0)
100#define PL011_UARTLCR_H_SPS (1 << 7)
101#define PL011_UARTLCR_H_WLEN_8 (3 << 5)
102#define PL011_UARTLCR_H_WLEN_7 (2 << 5)
103#define PL011_UARTLCR_H_WLEN_6 (1 << 5)
104#define PL011_UARTLCR_H_WLEN_5 (0 << 5)
105#define PL011_UARTLCR_H_FEN (1 << 4)
106#define PL011_UARTLCR_H_STP2 (1 << 3)
107#define PL011_UARTLCR_H_EPS (1 << 2)
108#define PL011_UARTLCR_H_PEN (1 << 1)
109#define PL011_UARTLCR_H_BRK (1 << 0)
111#define PL011_UARTPID2_VER(X) (((X) >> 4) & 0xF)
112#define PL011_VER_R1P4 0x2