RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
bsps
include
dev
serial
arm-pl011-regs.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
10
11
/*
12
* Copyright (c) 2013 embedded brains GmbH & Co. KG
13
*
14
* Redistribution and use in source and binary forms, with or without
15
* modification, are permitted provided that the following conditions
16
* are met:
17
* 1. Redistributions of source code must retain the above copyright
18
* notice, this list of conditions and the following disclaimer.
19
* 2. Redistributions in binary form must reproduce the above copyright
20
* notice, this list of conditions and the following disclaimer in the
21
* documentation and/or other materials provided with the distribution.
22
*
23
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
27
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33
* POSSIBILITY OF SUCH DAMAGE.
34
*/
35
42
43
#ifndef LIBBSP_ARM_SHARED_ARM_PL011_REGS_H
44
#define LIBBSP_ARM_SHARED_ARM_PL011_REGS_H
45
46
#include <
bsp/utility.h
>
47
48
typedef
struct
{
49
uint32_t uartdr;
50
#define PL011_UARTDR_OE BSP_BIT32(11)
51
#define PL011_UARTDR_BE BSP_BIT32(10)
52
#define PL011_UARTDR_PE BSP_BIT32(9)
53
#define PL011_UARTDR_FE BSP_BIT32(8)
54
#define PL011_UARTDR_DATA(val) BSP_FLD32(val, 0, 7)
55
#define PL011_UARTDR_DATA_GET(reg) BSP_FLD32GET(reg, 0, 7)
56
#define PL011_UARTDR_DATA_SET(reg, val) BSP_FLD32SET(reg, val, 0, 7)
57
uint32_t uartrsr_uartecr;
58
#define PL011_UARTRSR_UARTECR_OE BSP_BIT32(3)
59
#define PL011_UARTRSR_UARTECR_BE BSP_BIT32(2)
60
#define PL011_UARTRSR_UARTECR_PE BSP_BIT32(1)
61
#define PL011_UARTRSR_UARTECR_FE BSP_BIT32(0)
62
uint32_t reserved_08[4];
63
uint32_t uartfr;
64
#define PL011_UARTFR_RI BSP_BIT32(8)
65
#define PL011_UARTFR_TXFE BSP_BIT32(7)
66
#define PL011_UARTFR_RXFF BSP_BIT32(6)
67
#define PL011_UARTFR_TXFF BSP_BIT32(5)
68
#define PL011_UARTFR_RXFE BSP_BIT32(4)
69
#define PL011_UARTFR_BUSY BSP_BIT32(3)
70
#define PL011_UARTFR_DCD BSP_BIT32(2)
71
#define PL011_UARTFR_DSR BSP_BIT32(1)
72
#define PL011_UARTFR_CTS BSP_BIT32(0)
73
uint32_t reserved_1c;
74
uint32_t uartilpr;
75
#define PL011_UARTILPR_ILPDVSR(val) BSP_FLD32(val, 0, 7)
76
#define PL011_UARTILPR_ILPDVSR_GET(reg) BSP_FLD32GET(reg, 0, 7)
77
#define PL011_UARTILPR_ILPDVSR_SET(reg, val) BSP_FLD32SET(reg, val, 0, 7)
78
uint32_t uartibrd;
79
#define PL011_UARTIBRD_BAUD_DIVINT_WIDTH 16
80
#define PL011_UARTIBRD_BAUD_DIVINT_MASK \
81
BSP_MSK32(0, PL011_UARTIBRD_BAUD_DIVINT_WIDTH - 1)
82
#define PL011_UARTIBRD_BAUD_DIVINT(val) BSP_FLD32(val, 0, 15)
83
#define PL011_UARTIBRD_BAUD_DIVINT_GET(reg) BSP_FLD32GET(reg, 0, 15)
84
#define PL011_UARTIBRD_BAUD_DIVINT_SET(reg, val) BSP_FLD32SET(reg, val, 0, 15)
85
uint32_t uartfbrd;
86
#define PL011_UARTFBRD_BAUD_DIVFRAC_WIDTH 6
87
#define PL011_UARTFBRD_BAUD_DIVFRAC_MASK \
88
BSP_MSK32(0, PL011_UARTFBRD_BAUD_DIVFRAC_WIDTH - 1)
89
#define PL011_UARTFBRD_BAUD_DIVFRAC(val) BSP_FLD32(val, 0, 5)
90
#define PL011_UARTFBRD_BAUD_DIVFRAC_GET(reg) BSP_FLD32GET(reg, 0, 5)
91
#define PL011_UARTFBRD_BAUD_DIVFRAC_SET(reg, val) BSP_FLD32SET(reg, val, 0, 5)
92
uint32_t uartlcr_h;
93
#define PL011_UARTLCR_H_SPS BSP_BIT32(7)
94
#define PL011_UARTLCR_H_WLEN(val) BSP_FLD32(val, 5, 6)
95
#define PL011_UARTLCR_H_WLEN_GET(reg) BSP_FLD32GET(reg, 5, 6)
96
#define PL011_UARTLCR_H_WLEN_SET(reg, val) BSP_FLD32SET(reg, val, 5, 6)
97
#define PL011_UARTLCR_H_WLEN_5 0x00U
98
#define PL011_UARTLCR_H_WLEN_6 0x01U
99
#define PL011_UARTLCR_H_WLEN_7 0x02U
100
#define PL011_UARTLCR_H_WLEN_8 0x03U
101
#define PL011_UARTLCR_H_FEN BSP_BIT32(4)
102
#define PL011_UARTLCR_H_STP2 BSP_BIT32(3)
103
#define PL011_UARTLCR_H_EPS BSP_BIT32(2)
104
#define PL011_UARTLCR_H_PEN BSP_BIT32(1)
105
#define PL011_UARTLCR_H_BRK BSP_BIT32(0)
106
uint32_t uartcr;
107
#define PL011_UARTCR_CTSEN BSP_BIT32(15)
108
#define PL011_UARTCR_RTSEN BSP_BIT32(14)
109
#define PL011_UARTCR_OUT2 BSP_BIT32(13)
110
#define PL011_UARTCR_OUT1 BSP_BIT32(12)
111
#define PL011_UARTCR_RTS BSP_BIT32(11)
112
#define PL011_UARTCR_DTR BSP_BIT32(10)
113
#define PL011_UARTCR_RXE BSP_BIT32(9)
114
#define PL011_UARTCR_TXE BSP_BIT32(8)
115
#define PL011_UARTCR_LBE BSP_BIT32(7)
116
#define PL011_UARTCR_SIRLP BSP_BIT32(2)
117
#define PL011_UARTCR_SIREN BSP_BIT32(1)
118
#define PL011_UARTCR_UARTEN BSP_BIT32(0)
119
uint32_t uartifls;
120
#define PL011_UARTIFLS_RXIFLSEL(val) BSP_FLD32(val, 3, 5)
121
#define PL011_UARTIFLS_RXIFLSEL_GET(reg) BSP_FLD32GET(reg, 3, 5)
122
#define PL011_UARTIFLS_RXIFLSEL_SET(reg, val) BSP_FLD32SET(reg, val, 3, 5)
123
#define PL011_UARTIFLS_TXIFLSEL(val) BSP_FLD32(val, 0, 2)
124
#define PL011_UARTIFLS_TXIFLSEL_GET(reg) BSP_FLD32GET(reg, 0, 2)
125
#define PL011_UARTIFLS_TXIFLSEL_SET(reg, val) BSP_FLD32SET(reg, val, 0, 2)
126
uint32_t uartimsc;
127
uint32_t uartris;
128
uint32_t uartmis;
129
uint32_t uarticr;
130
#define PL011_UARTI_OEI BSP_BIT32(10)
131
#define PL011_UARTI_BEI BSP_BIT32(9)
132
#define PL011_UARTI_PEI BSP_BIT32(8)
133
#define PL011_UARTI_FEI BSP_BIT32(7)
134
#define PL011_UARTI_RTI BSP_BIT32(6)
135
#define PL011_UARTI_TXI BSP_BIT32(5)
136
#define PL011_UARTI_RXI BSP_BIT32(4)
137
#define PL011_UARTI_DSRMI BSP_BIT32(3)
138
#define PL011_UARTI_DCDMI BSP_BIT32(2)
139
#define PL011_UARTI_CTSMI BSP_BIT32(1)
140
#define PL011_UARTI_RIMI BSP_BIT32(0)
141
#define PL011_UARTI_MASK BSP_MSK32(0, 10)
142
uint32_t uartdmacr;
143
#define PL011_UARTDMACR_DMAONERR BSP_BIT32(2)
144
#define PL011_UARTDMACR_TXDMAE BSP_BIT32(1)
145
#define PL011_UARTDMACR_RXDMAE BSP_BIT32(0)
146
}
pl011_base
;
147
149
150
#endif
/* LIBBSP_ARM_SHARED_ARM_PL011_REGS_H */
utility.h
This header file provides utility macros for BSPs.
pl011_base
Definition
arm-pl011-regs.h:48
Generated by
1.18.0