]> git.cryptolib.org Git - arm-crypto-lib.git/blob - test_src/hw_uart_regs.h
switching to dedicated endian switching function
[arm-crypto-lib.git] / test_src / hw_uart_regs.h
1 /* hw_uart_regs.h */
2 /*
3     This file is part of the ARM-Crypto-Lib.
4     Copyright (C) 2010 Daniel Otte (daniel.otte@rub.de)
5
6     This program is free software: you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by
8     the Free Software Foundation, either version 3 of the License, or
9     (at your option) any later version.
10
11     This program is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef HW_UART_REGS_H_
21 #define HW_UART_REGS_H_
22
23 #define UART0_BASE 0x4000C000
24 #define UART1_BASE 0x4000D000
25 #define UART2_BASE 0x4000E000
26
27 #define UARTDR_OFFSET        0x00
28 #define UARTRSR_OFFSET       0x04
29 #define UARTECR_OFFSET       0x04
30 #define UARTFR_OFFSET        0x18
31 #define UARTILPR_OFFSET      0x20
32 #define UARTIBRD_OFFSET      0x24
33 #define UARTFBRD_OFFSET      0x28
34 #define UARTLCRH_OFFSET      0x2C
35 #define UARTCTL_OFFSET       0x30
36 #define UARTIFLS_OFFSET      0x34
37 #define UARTIM_OFFSET        0x38
38 #define UARTRIS_OFFSET       0x3C
39 #define UARTMIS_OFFSET       0x40
40 #define UARTICR_OFFSET       0x44
41 #define UARTDMACTL_OFFSET    0x48
42 #define UARTLCTL_OFFSET      0x90
43 #define UARTLSS_OFFSET       0x94
44 #define UARTLTIM_OFFSET      0x98
45
46 #define UARTPeriphID4_OFFSET  0x0FD0
47 #define UARTPeriphID5_OFFSET  0x0FD4
48 #define UARTPeriphID6_OFFSET  0x0FD8
49 #define UARTPeriphID7_OFFSET  0x0FDC
50 #define UARTPeriphID0_OFFSET  0x0FE0
51 #define UARTPeriphID1_OFFSET  0x0FE4
52 #define UARTPeriphID2_OFFSET  0x0FE8
53 #define UARTPeriphID3_OFFSET  0x0FEC
54
55 #define UARTCellID0_OFFSET    0x0FF0
56 #define UARTCellID1_OFFSET    0x0FF4
57 #define UARTCellID2_OFFSET    0x0FF8
58 #define UARTCellID3_OFFSET    0x0FFC
59
60 /* bits in UARTFR */
61 #define UART_RI   8
62 #define UART_TXFE 7
63 #define UART_RXFF 6
64 #define UART_TXFF 5
65 #define UART_RXFE 4
66 #define UART_BUSY 3
67 #define UART_DCD  2
68 #define UART_DSR  1
69 #define UART_CTS  0
70
71 /* bits in UARTLCRH */
72 #define UART_FEN 4
73
74 /* bits in UARTMIS */
75 #define UART_LME5MIS  15
76 #define UART_LME1MIS  14
77 #define UART_LMSBMIS  13
78 #define UART_OEMIS    10
79 #define UART_BEMIS     9
80 #define UART_PEMIS     8
81 #define UART_FEMIS     7
82 #define UART_RTMIS     6
83 #define UART_TXMIS     5
84 #define UART_RXMIS     4
85 #define UART_DSRMIS    3
86 #define UART_DCDMIS    2
87 #define UART_CTSMIS    1
88 #define UART_RIMIS     0
89
90 /* bits in UARTICR */
91 #define UART_LME5MIC  15
92 #define UART_LME1MIC  14
93 #define UART_LMSBMIC  13
94 #define UART_OEIC     10
95 #define UART_BEIC      9
96 #define UART_PEIC      8
97 #define UART_FEIC      7
98 #define UART_RTIC      6
99 #define UART_TXIC      5
100 #define UART_RXIC      4
101 #define UART_DSRMIC    3
102 #define UART_DCDMIC    2
103 #define UART_CTSMIC    1
104 #define UART_RIMIC     0
105
106 /* bits in UARTIM */
107 #define UART_LME5IM  15
108 #define UART_LME1IM  14
109 #define UART_LMSBIM  13
110 #define UART_OEIM    10
111 #define UART_BEIM     9
112 #define UART_PEIM     8
113 #define UART_FEIM     7
114 #define UART_RTIM     6
115 #define UART_TXIM     5
116 #define UART_RXIM     4
117 #define UART_DSRIM    3
118 #define UART_DCDIM    2
119 #define UART_CTSIM    1
120 #define UART_RIIM     0
121
122 /* bits in UARTRIS */
123 #define UART_LME5RIS  15
124 #define UART_LME1RIS  14
125 #define UART_LMSBRIS  13
126 #define UART_OERIS    10
127 #define UART_BERIS     9
128 #define UART_PERIS     8
129 #define UART_FERIS     7
130 #define UART_RTRIS     6
131 #define UART_TXRIS     5
132 #define UART_RXRIS     4
133 #define UART_DSRRIS    3
134 #define UART_DCDRIS    2
135 #define UART_CTSRIS    1
136 #define UART_RIRIS     0
137
138 /* bits in UARTCTL */
139 #define UART_CTSEN    15
140 #define UART_RTSEN    14
141 #define UART_RTS      11
142 #define UART_DTR      10
143 #define UART_RXE       9
144 #define UART_TXE       8
145 #define UART_LBE       7
146 #define UART_LIN       6
147 #define UART_HSE       5
148 #define UART_EOT       4
149 #define UART_SMART     3
150 #define UART_SIRLP     2
151 #define UART_SIREN     1
152 #define UART_UARTEN    0
153
154 #endif /* HW_UART_REGS_H_ */