1 |
27 |
unneback |
//==========================================================================
|
2 |
|
|
//
|
3 |
|
|
// hal_sa11x0.h
|
4 |
|
|
//
|
5 |
|
|
// HAL misc board support definitions for StrongARM SA11x0
|
6 |
|
|
//
|
7 |
|
|
//==========================================================================
|
8 |
|
|
//####ECOSGPLCOPYRIGHTBEGIN####
|
9 |
|
|
// -------------------------------------------
|
10 |
|
|
// This file is part of eCos, the Embedded Configurable Operating System.
|
11 |
|
|
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
|
12 |
|
|
// Copyright (C) 2002 Gary Thomas
|
13 |
|
|
//
|
14 |
|
|
// eCos is free software; you can redistribute it and/or modify it under
|
15 |
|
|
// the terms of the GNU General Public License as published by the Free
|
16 |
|
|
// Software Foundation; either version 2 or (at your option) any later version.
|
17 |
|
|
//
|
18 |
|
|
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
|
19 |
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
20 |
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
21 |
|
|
// for more details.
|
22 |
|
|
//
|
23 |
|
|
// You should have received a copy of the GNU General Public License along
|
24 |
|
|
// with eCos; if not, write to the Free Software Foundation, Inc.,
|
25 |
|
|
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
26 |
|
|
//
|
27 |
|
|
// As a special exception, if other files instantiate templates or use macros
|
28 |
|
|
// or inline functions from this file, or you compile this file and link it
|
29 |
|
|
// with other works to produce a work based on this file, this file does not
|
30 |
|
|
// by itself cause the resulting work to be covered by the GNU General Public
|
31 |
|
|
// License. However the source code for this file must still be made available
|
32 |
|
|
// in accordance with section (3) of the GNU General Public License.
|
33 |
|
|
//
|
34 |
|
|
// This exception does not invalidate any other reasons why a work based on
|
35 |
|
|
// this file might be covered by the GNU General Public License.
|
36 |
|
|
//
|
37 |
|
|
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
|
38 |
|
|
// at http://sources.redhat.com/ecos/ecos-license/
|
39 |
|
|
// -------------------------------------------
|
40 |
|
|
//####ECOSGPLCOPYRIGHTEND####
|
41 |
|
|
//==========================================================================
|
42 |
|
|
//#####DESCRIPTIONBEGIN####
|
43 |
|
|
//
|
44 |
|
|
// Author(s): gthomas
|
45 |
|
|
// Contributors: gthomas, dmoseley
|
46 |
|
|
// Date: 2000-04-04
|
47 |
|
|
// Purpose: Platform register definitions
|
48 |
|
|
// Description:
|
49 |
|
|
//
|
50 |
|
|
//####DESCRIPTIONEND####
|
51 |
|
|
//
|
52 |
|
|
//========================================================================*/
|
53 |
|
|
|
54 |
|
|
#ifndef __HAL_SA11X0_H__
|
55 |
|
|
#define __HAL_SA11X0_H__ 1
|
56 |
|
|
|
57 |
|
|
#ifdef __ASSEMBLER__
|
58 |
|
|
|
59 |
|
|
#define REG8_VAL(a) (a)
|
60 |
|
|
#define REG16_VAL(a) (a)
|
61 |
|
|
#define REG32_VAL(a) (a)
|
62 |
|
|
|
63 |
|
|
#define REG8_PTR(a) (a)
|
64 |
|
|
#define REG16_PTR(a) (a)
|
65 |
|
|
#define REG32_PTR(a) (a)
|
66 |
|
|
|
67 |
|
|
#else /* __ASSEMBLER__ */
|
68 |
|
|
|
69 |
|
|
#define REG8_VAL(a) ((unsigned char)(a))
|
70 |
|
|
#define REG16_VAL(a) ((unsigned short)(a))
|
71 |
|
|
#define REG32_VAL(a) ((unsigned int)(a))
|
72 |
|
|
|
73 |
|
|
#define REG8_PTR(a) ((volatile unsigned char *)(a))
|
74 |
|
|
#define REG16_PTR(a) ((volatile unsigned long *)(a))
|
75 |
|
|
#define REG32_PTR(a) ((volatile unsigned long *)(a))
|
76 |
|
|
|
77 |
|
|
#endif /* __ASSEMBLER__ */
|
78 |
|
|
|
79 |
|
|
/*
|
80 |
|
|
* SA11X0 Default Memory Layout Definitions
|
81 |
|
|
*/
|
82 |
|
|
// Typically ROM, FLASH
|
83 |
|
|
#define SA11X0_ROM_BANK0_BASE (0)
|
84 |
|
|
#define SA11X0_ROM_BANK1_BASE (SA11X0_ROM_BANK0_BASE + SZ_128M)
|
85 |
|
|
#define SA11X0_ROM_BANK2_BASE (SA11X0_ROM_BANK1_BASE + SZ_128M)
|
86 |
|
|
#define SA11X0_ROM_BANK3_BASE (SA11X0_ROM_BANK2_BASE + SZ_128M)
|
87 |
|
|
|
88 |
|
|
// May be ROM, FLASH, SRAM, etc
|
89 |
|
|
#define SA11X0_ROM_BANK4_BASE (0x40000000)
|
90 |
|
|
#define SA11X0_ROM_BANK5_BASE (SA11X0_ROM_BANK4_BASE + SZ_128M)
|
91 |
|
|
|
92 |
|
|
// Typically DRAM
|
93 |
|
|
#define SA11X0_RAM_BANK0_BASE (0xC0000000)
|
94 |
|
|
#define SA11X0_RAM_BANK1_BASE (SA11X0_RAM_BANK0_BASE + SZ_128M)
|
95 |
|
|
#define SA11X0_RAM_BANK2_BASE (SA11X0_RAM_BANK1_BASE + SZ_128M)
|
96 |
|
|
#define SA11X0_RAM_BANK3_BASE (SA11X0_RAM_BANK2_BASE + SZ_128M)
|
97 |
|
|
|
98 |
|
|
#define SA11X0_ZEROS_BANK_BASE (SA11X0_RAM_BANK3_BASE + SZ_128M)
|
99 |
|
|
|
100 |
|
|
/*
|
101 |
|
|
* SA11X0 Register Definitions
|
102 |
|
|
*/
|
103 |
|
|
#define SA11X0_REGISTER_BASE 0x80000000
|
104 |
|
|
#define SA11X0_REGISTER(x) REG32_PTR(SA11X0_REGISTER_BASE + (x))
|
105 |
|
|
|
106 |
|
|
/*
|
107 |
|
|
* SA-1100 Cache and MMU Definitions
|
108 |
|
|
*/
|
109 |
|
|
#define SA11X0_ICACHE_SIZE 0x4000 // 16K
|
110 |
|
|
#define SA11X0_DCACHE_SIZE 0x2000 // 8K
|
111 |
|
|
#define SA11X0_ICACHE_LINESIZE_BYTES 32
|
112 |
|
|
#define SA11X0_DCACHE_LINESIZE_BYTES 32
|
113 |
|
|
#define SA11X0_ICACHE_LINESIZE_WORDS 8
|
114 |
|
|
#define SA11X0_DCACHE_LINESIZE_WORDS 8
|
115 |
|
|
#define SA11X0_ICACHE_WAYS 32
|
116 |
|
|
#define SA11X0_DCACHE_WAYS 32
|
117 |
|
|
#define SA11X0_ICACHE_LINE_BASE(p) REG32_PTR((unsigned long)(p) & \
|
118 |
|
|
~(SA11X0_ICACHE_LINESIZE_BYTES - 1))
|
119 |
|
|
#define SA11X0_DCACHE_LINE_BASE(p) REG32_PTR((unsigned long)(p) & \
|
120 |
|
|
~(SA11X0_DCACHE_LINESIZE_BYTES - 1))
|
121 |
|
|
|
122 |
|
|
/*
|
123 |
|
|
* SA-1100 Coprocessor 15 Extensions Register Definitions
|
124 |
|
|
*/
|
125 |
|
|
#ifdef __ASSEMBLER__
|
126 |
|
|
# define SA11X0_READ_PROCESS_ID_REGISTER c13
|
127 |
|
|
# define SA11X0_WRITE_PROCESS_ID_REGISTER c13
|
128 |
|
|
# define SA11X0_READ_BREAKPOINT_REGISTER c14
|
129 |
|
|
# define SA11X0_WRITE_BREAKPOINT_REGISTER c14
|
130 |
|
|
# define SA11X0_TEST_CLOCK_AND_IDLE_REGISTER c15
|
131 |
|
|
#else /* __ASSEMBLER__ */
|
132 |
|
|
# define SA11X0_READ_PROCESS_ID_REGISTER "c13"
|
133 |
|
|
# define SA11X0_WRITE_PROCESS_ID_REGISTER "c13"
|
134 |
|
|
# define SA11X0_READ_BREAKPOINT_REGISTER "c14"
|
135 |
|
|
# define SA11X0_WRITE_BREAKPOINT_REGISTER "c14"
|
136 |
|
|
# define SA11X0_TEST_CLOCK_AND_IDLE_REGISTER "c15"
|
137 |
|
|
#endif /* __ASSEMBLER__ */
|
138 |
|
|
|
139 |
|
|
/*
|
140 |
|
|
* SA-1100 Process ID Virtual Address Mapping Definitions
|
141 |
|
|
*/
|
142 |
|
|
#ifdef __ASSEMBLER__
|
143 |
|
|
# define SA11X0_ACCESS_PROC_ID_REGISTER_OPCODE 0x0
|
144 |
|
|
# define SA11X0_ACCESS_PROC_ID_REGISTER_RM c0
|
145 |
|
|
#else /* __ASSEMBLER__ */
|
146 |
|
|
# define SA11X0_ACCESS_PROC_ID_REGISTER_OPCODE "0x0"
|
147 |
|
|
# define SA11X0_ACCESS_PROC_ID_REGISTER_RM "c0"
|
148 |
|
|
#endif /* __ASSEMBLER__ */
|
149 |
|
|
|
150 |
|
|
#define SA11X0_PROCESS_ID_PID_MASK 0x7E000000
|
151 |
|
|
|
152 |
|
|
/*
|
153 |
|
|
* SA-1100 Debug Support Definitions
|
154 |
|
|
*/
|
155 |
|
|
#ifdef __ASSEMBLER__
|
156 |
|
|
# define SA11X0_ACCESS_DBAR_OPCODE 0x0
|
157 |
|
|
# define SA11X0_ACCESS_DBAR_RM c0
|
158 |
|
|
# define SA11X0_ACCESS_DBVR_OPCODE 0x0
|
159 |
|
|
# define SA11X0_ACCESS_DBVR_RM c1
|
160 |
|
|
# define SA11X0_ACCESS_DBMR_OPCODE 0x0
|
161 |
|
|
# define SA11X0_ACCESS_DBMR_RM c2
|
162 |
|
|
# define SA11X0_LOAD_DBCR_OPCODE 0x0
|
163 |
|
|
# define SA11X0_LOAD_DBCR_RM c3
|
164 |
|
|
#else /* __ASSEMBLER__ */
|
165 |
|
|
# define SA11X0_ACCESS_DBAR_OPCODE "0x0"
|
166 |
|
|
# define SA11X0_ACCESS_DBAR_RM "c0"
|
167 |
|
|
# define SA11X0_ACCESS_DBVR_OPCODE "0x0"
|
168 |
|
|
# define SA11X0_ACCESS_DBVR_RM "c1"
|
169 |
|
|
# define SA11X0_ACCESS_DBMR_OPCODE "0x0"
|
170 |
|
|
# define SA11X0_ACCESS_DBMR_RM "c2"
|
171 |
|
|
# define SA11X0_LOAD_DBCR_OPCODE "0x0"
|
172 |
|
|
# define SA11X0_LOAD_DBCR_RM "c3"
|
173 |
|
|
#endif /* __ASSEMBLER__ */
|
174 |
|
|
|
175 |
|
|
#define SA11X0_DBCR_LOAD_WATCH_DISABLED 0x00000000
|
176 |
|
|
#define SA11X0_DBCR_LOAD_WATCH_ENABLED 0x00000001
|
177 |
|
|
#define SA11X0_DBCR_LOAD_WATCH_MASK 0x00000001
|
178 |
|
|
#define SA11X0_DBCR_STORE_ADDRESS_WATCH_DISABLED 0x00000000
|
179 |
|
|
#define SA11X0_DBCR_STORE_ADDRESS_WATCH_ENABLED 0x00000002
|
180 |
|
|
#define SA11X0_DBCR_STORE_ADDRESS_WATCH_MASK 0x00000002
|
181 |
|
|
#define SA11X0_DBCR_STORE_DATA_WATCH_DISABLED 0x00000000
|
182 |
|
|
#define SA11X0_DBCR_STORE_DATA_WATCH_ENABLED 0x00000004
|
183 |
|
|
#define SA11X0_DBCR_STORE_DATA_WATCH_MASK 0x00000004
|
184 |
|
|
|
185 |
|
|
#define SA11X0_IBCR_INSTRUCTION_ADDRESS_MASK 0xFFFFFFFC
|
186 |
|
|
#define SA11X0_IBCR_BREAKPOINT_DISABLED 0x00000000
|
187 |
|
|
#define SA11X0_IBCR_BREAKPOINT_ENABLED 0x00000001
|
188 |
|
|
#define SA11X0_IBCR_BREAKPOINT_ENABLE_MASK 0x00000001
|
189 |
|
|
|
190 |
|
|
/*
|
191 |
|
|
* SA-1100 Test, Clock and Idle Control Definition
|
192 |
|
|
*/
|
193 |
|
|
#ifdef __ASSEMBLER__
|
194 |
|
|
# define SA11X0_ICACHE_ODD_WORD_LOADING_OPCODE 0x1
|
195 |
|
|
# define SA11X0_ICACHE_ODD_WORD_LOADING_RM c1
|
196 |
|
|
# define SA11X0_ICACHE_EVEN_WORD_LOADING_OPCODE 0x1
|
197 |
|
|
# define SA11X0_ICACHE_EVEN_WORD_LOADING_RM c2
|
198 |
|
|
# define SA11X0_ICACHE_CLEAR_LFSR_OPCODE 0x1
|
199 |
|
|
# define SA11X0_ICACHE_CLEAR_LFSR_RM c4
|
200 |
|
|
# define SA11X0_MOVE_LFSR_TO_R14_ABORT_OPCODE 0x1
|
201 |
|
|
# define SA11X0_MOVE_LFSR_TO_R14_ABORT_RM c8
|
202 |
|
|
# define SA11X0_ENABLE_CLOCK_SWITCHING_OPCODE 0x2
|
203 |
|
|
# define SA11X0_ENABLE_CLOCK_SWITCHING_RM c1
|
204 |
|
|
# define SA11X0_DISABLE_CLOCK_SWITCHING_OPCODE 0x2
|
205 |
|
|
# define SA11X0_DISABLE_CLOCK_SWITCHING_RM c2
|
206 |
|
|
# define SA11X0_WAIT_FOR_INTERRUPT_OPCODE 0x2
|
207 |
|
|
# define SA11X0_WAIT_FOR_INTERRUPT_RM c8
|
208 |
|
|
#else /* __ASSEMBLER__ */
|
209 |
|
|
# define SA11X0_ICACHE_ODD_WORD_LOADING_OPCODE "0x1"
|
210 |
|
|
# define SA11X0_ICACHE_ODD_WORD_LOADING_RM "c1"
|
211 |
|
|
# define SA11X0_ICACHE_EVEN_WORD_LOADING_OPCODE "0x1"
|
212 |
|
|
# define SA11X0_ICACHE_EVEN_WORD_LOADING_RM "c2"
|
213 |
|
|
# define SA11X0_ICACHE_CLEAR_LFSR_OPCODE "0x1"
|
214 |
|
|
# define SA11X0_ICACHE_CLEAR_LFSR_RM "c4"
|
215 |
|
|
# define SA11X0_MOVE_LFSR_TO_R14_ABORT_OPCODE "0x1"
|
216 |
|
|
# define SA11X0_MOVE_LFSR_TO_R14_ABORT_RM "c8"
|
217 |
|
|
# define SA11X0_ENABLE_CLOCK_SWITCHING_OPCODE "0x2"
|
218 |
|
|
# define SA11X0_ENABLE_CLOCK_SWITCHING_RM "c1"
|
219 |
|
|
# define SA11X0_DISABLE_CLOCK_SWITCHING_OPCODE "0x2"
|
220 |
|
|
# define SA11X0_DISABLE_CLOCK_SWITCHING_RM "c2"
|
221 |
|
|
# define SA11X0_WAIT_FOR_INTERRUPT_OPCODE "0x2"
|
222 |
|
|
# define SA11X0_WAIT_FOR_INTERRUPT_RM "c8"
|
223 |
|
|
#endif /* __ASSEMBLER__ */
|
224 |
|
|
|
225 |
|
|
|
226 |
|
|
/*
|
227 |
|
|
* SA11X0 IRQ Controller IRQ Numbers
|
228 |
|
|
*/
|
229 |
|
|
#define SA11X0_IRQ_MIN 0
|
230 |
|
|
|
231 |
|
|
#define SA11X0_IRQ_GPIO_0_EDGE_DETECT 0
|
232 |
|
|
#define SA11X0_IRQ_GPIO_1_EDGE_DETECT 1
|
233 |
|
|
#define SA11X0_IRQ_GPIO_2_EDGE_DETECT 2
|
234 |
|
|
#define SA11X0_IRQ_GPIO_3_EDGE_DETECT 3
|
235 |
|
|
#define SA11X0_IRQ_GPIO_4_EDGE_DETECT 4
|
236 |
|
|
#define SA11X0_IRQ_GPIO_5_EDGE_DETECT 5
|
237 |
|
|
#define SA11X0_IRQ_GPIO_6_EDGE_DETECT 6
|
238 |
|
|
#define SA11X0_IRQ_GPIO_7_EDGE_DETECT 7
|
239 |
|
|
#define SA11X0_IRQ_GPIO_8_EDGE_DETECT 8
|
240 |
|
|
#define SA11X0_IRQ_GPIO_9_EDGE_DETECT 9
|
241 |
|
|
#define SA11X0_IRQ_GPIO_10_EDGE_DETECT 10
|
242 |
|
|
#define SA11X0_IRQ_GPIO_ANY_EDGE_DETECT 11
|
243 |
|
|
#define SA11X0_IRQ_LCD_CONT_SERVICE_REQUEST 12
|
244 |
|
|
#define SA11X0_IRQ_USB_SERVICE_REQUEST 13
|
245 |
|
|
#define SA11X0_IRQ_SDLC_SERVICE_REQUEST 14
|
246 |
|
|
#define SA11X0_IRQ_UART1_SERVICE_REQUEST 15
|
247 |
|
|
#define SA11X0_IRQ_ICP_SERVICE_REQUEST 16
|
248 |
|
|
#define SA11X0_IRQ_UART3_SERVICE_REQUEST 17
|
249 |
|
|
#define SA11X0_IRQ_MCP_SERVICE_REQUEST 18
|
250 |
|
|
#define SA11X0_IRQ_SSP_SERVICE_REQUEST 19
|
251 |
|
|
#define SA11X0_IRQ_CHANNEL_0_SERVICE_REQUEST 20
|
252 |
|
|
#define SA11X0_IRQ_CHANNEL_1_SERVICE_REQUEST 21
|
253 |
|
|
#define SA11X0_IRQ_CHANNEL_2_SERVICE_REQUEST 22
|
254 |
|
|
#define SA11X0_IRQ_CHANNEL_3_SERVICE_REQUEST 23
|
255 |
|
|
#define SA11X0_IRQ_CHANNEL_4_SERVICE_REQUEST 24
|
256 |
|
|
#define SA11X0_IRQ_CHANNEL_5_SERVICE_REQUEST 25
|
257 |
|
|
#define SA11X0_IRQ_OS_TIMER_MATCH_REG_0 26
|
258 |
|
|
#define SA11X0_IRQ_OS_TIMER_MATCH_REG_1 27
|
259 |
|
|
#define SA11X0_IRQ_OS_TIMER_MATCH_REG_2 28
|
260 |
|
|
#define SA11X0_IRQ_OS_TIMER_MATCH_REG_3 29
|
261 |
|
|
#define SA11X0_IRQ_ONE_HZ_CLOCK_TIC 30
|
262 |
|
|
#define SA11X0_IRQ_RTC_EQUALS_ALARM 31
|
263 |
|
|
|
264 |
|
|
#define SA11X0_IRQ_MAX 31
|
265 |
|
|
#define NUM_SA11X0_INTERRUPTS SA11X0_IRQ_MAX - SA11X0_IRQ_MIN + 1
|
266 |
|
|
#define SA11X0_IRQ_INTSRC_MASK(irq_nr) (1 << (irq_nr))
|
267 |
|
|
|
268 |
|
|
/*
|
269 |
|
|
* SA11X0 UART 1 Registers
|
270 |
|
|
*/
|
271 |
|
|
#define SA11X0_UART1_BASE SA11X0_REGISTER(0x10000)
|
272 |
|
|
#define SA11X0_UART1_CONTROL0 SA11X0_REGISTER(0x10000)
|
273 |
|
|
#define SA11X0_UART1_CONTROL1 SA11X0_REGISTER(0x10004)
|
274 |
|
|
#define SA11X0_UART1_CONTROL2 SA11X0_REGISTER(0x10008)
|
275 |
|
|
#define SA11X0_UART1_CONTROL3 SA11X0_REGISTER(0x1000C)
|
276 |
|
|
#define SA11X0_UART1_DATA SA11X0_REGISTER(0x10014)
|
277 |
|
|
#define SA11X0_UART1_STATUS0 SA11X0_REGISTER(0x1001C)
|
278 |
|
|
#define SA11X0_UART1_STATUS1 SA11X0_REGISTER(0x10020)
|
279 |
|
|
|
280 |
|
|
/*
|
281 |
|
|
* SA11X0 UART 3 Registers
|
282 |
|
|
*/
|
283 |
|
|
#define SA11X0_UART3_BASE SA11X0_REGISTER(0x50000)
|
284 |
|
|
#define SA11X0_UART3_CONTROL0 SA11X0_REGISTER(0x50000)
|
285 |
|
|
#define SA11X0_UART3_CONTROL1 SA11X0_REGISTER(0x50004)
|
286 |
|
|
#define SA11X0_UART3_CONTROL2 SA11X0_REGISTER(0x50008)
|
287 |
|
|
#define SA11X0_UART3_CONTROL3 SA11X0_REGISTER(0x5000C)
|
288 |
|
|
#define SA11X0_UART3_DATA SA11X0_REGISTER(0x50014)
|
289 |
|
|
#define SA11X0_UART3_STATUS0 SA11X0_REGISTER(0x5001C)
|
290 |
|
|
#define SA11X0_UART3_STATUS1 SA11X0_REGISTER(0x50020)
|
291 |
|
|
|
292 |
|
|
/*
|
293 |
|
|
* SA11X0 UART Control Register 0 Bit Fields.
|
294 |
|
|
*/
|
295 |
|
|
#define SA11X0_UART_PARITY_DISABLED 0x00
|
296 |
|
|
#define SA11X0_UART_PARITY_ENABLED 0x01
|
297 |
|
|
#define SA11X0_UART_PARITY_ENABLE_MASK 0x01
|
298 |
|
|
#define SA11X0_UART_PARITY_ODD 0x00
|
299 |
|
|
#define SA11X0_UART_PARITY_EVEN 0x02
|
300 |
|
|
#define SA11X0_UART_PARITY_MODE_MASK 0x02
|
301 |
|
|
#define SA11X0_UART_STOP_BITS_1 0x00
|
302 |
|
|
#define SA11X0_UART_STOP_BITS_2 0x04
|
303 |
|
|
#define SA11X0_UART_STOP_BITS_MASK 0x04
|
304 |
|
|
#define SA11X0_UART_DATA_BITS_7 0x00
|
305 |
|
|
#define SA11X0_UART_DATA_BITS_8 0x08
|
306 |
|
|
#define SA11X0_UART_DATA_BITS_MASK 0x08
|
307 |
|
|
#define SA11X0_UART_SAMPLE_CLOCK_DISABLED 0x00
|
308 |
|
|
#define SA11X0_UART_SAMPLE_CLOCK_ENABLED 0x10
|
309 |
|
|
#define SA11X0_UART_SAMPLE_CLOCK_ENABLE_MASK 0x10
|
310 |
|
|
#define SA11X0_UART_RX_RISING_EDGE_SELECT 0x00
|
311 |
|
|
#define SA11X0_UART_RX_FALLING_EDGE_SELECT 0x20
|
312 |
|
|
#define SA11X0_UART_RX_EDGE_SELECT_MASK 0x20
|
313 |
|
|
#define SA11X0_UART_TX_RISING_EDGE_SELECT 0x00
|
314 |
|
|
#define SA11X0_UART_TX_FALLING_EDGE_SELECT 0x40
|
315 |
|
|
#define SA11X0_UART_TX_EDGE_SELECT_MASK 0x20
|
316 |
|
|
|
317 |
|
|
/*
|
318 |
|
|
* SA-1100 UART Baud Control Register bit masks
|
319 |
|
|
*/
|
320 |
|
|
#define SA11X0_UART_H_BAUD_RATE_DIVISOR_MASK 0x0000000F
|
321 |
|
|
#define SA11X0_UART_L_BAUD_RATE_DIVISOR_MASK 0x000000FF
|
322 |
|
|
#define SA11X0_UART_BAUD_RATE_DIVISOR(x) ((3686400/(16*(x)))-1)
|
323 |
|
|
|
324 |
|
|
/*
|
325 |
|
|
* SA-1100 UART Control Register 3 Bit Fields.
|
326 |
|
|
*/
|
327 |
|
|
#define SA11X0_UART_RX_DISABLED 0x00
|
328 |
|
|
#define SA11X0_UART_RX_ENABLED 0x01
|
329 |
|
|
#define SA11X0_UART_RX_ENABLE_MASK 0x01
|
330 |
|
|
#define SA11X0_UART_TX_DISABLED 0x00
|
331 |
|
|
#define SA11X0_UART_TX_ENABLED 0x02
|
332 |
|
|
#define SA11X0_UART_TX_ENABLE_MASK 0x02
|
333 |
|
|
#define SA11X0_UART_BREAK_DISABLED 0x00
|
334 |
|
|
#define SA11X0_UART_BREAK_ENABLED 0x04
|
335 |
|
|
#define SA11X0_UART_BREAK_MASK 0x04
|
336 |
|
|
#define SA11X0_UART_RX_FIFO_INT_DISABLED 0x00
|
337 |
|
|
#define SA11X0_UART_RX_FIFO_INT_ENABLED 0x08
|
338 |
|
|
#define SA11X0_UART_RX_FIFO_INT_ENABLE_MASK 0x08
|
339 |
|
|
#define SA11X0_UART_TX_FIFO_INT_DISABLED 0x00
|
340 |
|
|
#define SA11X0_UART_TX_FIFO_INT_ENABLED 0x10
|
341 |
|
|
#define SA11X0_UART_TX_FIFO_INT_ENABLE_MASK 0x10
|
342 |
|
|
#define SA11X0_UART_NORMAL_OPERATION 0x00
|
343 |
|
|
#define SA11X0_UART_LOOPBACK_MODE 0x20
|
344 |
|
|
|
345 |
|
|
/*
|
346 |
|
|
* SA-1100 UART Data Register bit masks
|
347 |
|
|
*/
|
348 |
|
|
#define SA11X0_UART_DATA_MASK 0x000000FF
|
349 |
|
|
|
350 |
|
|
/*
|
351 |
|
|
* SA-1100 UART Status Register 0 Bit Fields.
|
352 |
|
|
*/
|
353 |
|
|
#define SA11X0_UART_TX_SERVICE_REQUEST 0x01
|
354 |
|
|
#define SA11X0_UART_RX_SERVICE_REQUEST 0x02
|
355 |
|
|
#define SA11X0_UART_RX_IDLE 0x04
|
356 |
|
|
#define SA11X0_UART_RX_BEGIN_OF_BREAK 0x08
|
357 |
|
|
#define SA11X0_UART_RX_END_OF_BREAK 0x10
|
358 |
|
|
#define SA11X0_UART_ERROR_IN_FIFO 0x20
|
359 |
|
|
|
360 |
|
|
/*
|
361 |
|
|
* SA-1100 UART Status Register 1 Bit Fields.
|
362 |
|
|
*/
|
363 |
|
|
#define SA11X0_UART_TX_BUSY 0x01
|
364 |
|
|
#define SA11X0_UART_RX_FIFO_NOT_EMPTY 0x02
|
365 |
|
|
#define SA11X0_UART_TX_FIFO_NOT_FULL 0x04
|
366 |
|
|
#define SA11X0_UART_PARITY_ERROR 0x08
|
367 |
|
|
#define SA11X0_UART_FRAMING_ERROR 0x10
|
368 |
|
|
#define SA11X0_UART_RX_FIFO_OVERRUN 0x20
|
369 |
|
|
|
370 |
|
|
#define UART_BASE_0 SA11X0_UART_CONTROL_0
|
371 |
|
|
#define UART_BASE_1 SA11X0_UART_1_CONTROL_0
|
372 |
|
|
|
373 |
|
|
/*
|
374 |
|
|
* SA11X0 IRQ Controller Register Definitions.
|
375 |
|
|
*/
|
376 |
|
|
#define SA11X0_ICIP SA11X0_REGISTER(0x10050000)
|
377 |
|
|
#define SA11X0_ICMR SA11X0_REGISTER(0x10050004)
|
378 |
|
|
#define SA11X0_ICLR SA11X0_REGISTER(0x10050008)
|
379 |
|
|
#define SA11X0_ICCR SA11X0_REGISTER(0x1005000C)
|
380 |
|
|
#define SA11X0_ICFP SA11X0_REGISTER(0x10050010)
|
381 |
|
|
#define SA11X0_ICPR SA11X0_REGISTER(0x10050020)
|
382 |
|
|
|
383 |
|
|
/*
|
384 |
|
|
* SA11X0 IRQ Controller Control Register Bit Fields.
|
385 |
|
|
*/
|
386 |
|
|
#define SA11X0_ICCR_DISABLE_IDLE_MASK_ALL 0x0
|
387 |
|
|
#define SA11X0_ICCR_DISABLE_IDLE_MASK_ENABLED 0x1
|
388 |
|
|
|
389 |
|
|
/*
|
390 |
|
|
* SA11X0 Timer/counter registers
|
391 |
|
|
*/
|
392 |
|
|
#define SA11X0_OSMR0 SA11X0_REGISTER(0x10000000)
|
393 |
|
|
#define SA11X0_OSMR1 SA11X0_REGISTER(0x10000004)
|
394 |
|
|
#define SA11X0_OSMR2 SA11X0_REGISTER(0x10000008)
|
395 |
|
|
#define SA11X0_OSMR3 SA11X0_REGISTER(0x1000000C)
|
396 |
|
|
#define SA11X0_OSCR SA11X0_REGISTER(0x10000010)
|
397 |
|
|
#define SA11X0_OSSR SA11X0_REGISTER(0x10000014)
|
398 |
|
|
#define SA11X0_OWER SA11X0_REGISTER(0x10000018)
|
399 |
|
|
#define SA11X0_OIER SA11X0_REGISTER(0x1000001C)
|
400 |
|
|
#define SA11X0_RCNR SA11X0_REGISTER(0x10010004)
|
401 |
|
|
#define SA11X0_RTTR SA11X0_REGISTER(0x10010008)
|
402 |
|
|
#define SA11X0_RTSR SA11X0_REGISTER(0x10010010)
|
403 |
|
|
|
404 |
|
|
// Timer status register
|
405 |
|
|
#define SA11X0_OSSR_TIMER0 (1<<0) // Timer match register #0
|
406 |
|
|
#define SA11X0_OSSR_TIMER1 (1<<1)
|
407 |
|
|
#define SA11X0_OSSR_TIMER2 (1<<2)
|
408 |
|
|
#define SA11X0_OSSR_TIMER3 (1<<3)
|
409 |
|
|
|
410 |
|
|
// Timer interrupt enable register
|
411 |
|
|
#define SA11X0_OIER_TIMER0 (1<<0)
|
412 |
|
|
#define SA11X0_OIER_TIMER1 (1<<1)
|
413 |
|
|
#define SA11X0_OIER_TIMER2 (1<<2)
|
414 |
|
|
#define SA11X0_OIER_TIMER3 (1<<3)
|
415 |
|
|
|
416 |
|
|
// OS Timer Watchdog Match Enable Register
|
417 |
|
|
#define SA11X0_OWER_ENABLE (1<<0) // write-once!
|
418 |
|
|
|
419 |
|
|
/*
|
420 |
|
|
* SA-1100 Reset Controller Register Definition
|
421 |
|
|
*/
|
422 |
|
|
#define SA11X0_RESET_SOFTWARE_RESET SA11X0_REGISTER(0x10030000)
|
423 |
|
|
#define SA11X0_RESET_STATUS SA11X0_REGISTER(0x10030004)
|
424 |
|
|
#define SA11X0_TUCR SA11X0_REGISTER(0x10030008)
|
425 |
|
|
|
426 |
|
|
#define SA11X0_TUCR_EXTERNAL_MEMORY_MASTER (1<<10)
|
427 |
|
|
#define SA11X0_TUCR_RESERVED_BITS 0x1FFFF9FF
|
428 |
|
|
|
429 |
|
|
/*
|
430 |
|
|
* SA-1100 Reset Controller Bit Field Definitions
|
431 |
|
|
*/
|
432 |
|
|
#define SA11X0_INVOKE_SOFTWARE_RESET 0x1
|
433 |
|
|
|
434 |
|
|
#define SA11X0_HARDWARE_RESET 0x1
|
435 |
|
|
#define SA11X0_SOFTWARE_RESET 0x2
|
436 |
|
|
#define SA11X0_WATCHDOG_RESET 0x4
|
437 |
|
|
#define SA11X0_SLEEP_MODE_RESET 0x8
|
438 |
|
|
|
439 |
|
|
/*
|
440 |
|
|
* SA-1100 Power Manager Registers
|
441 |
|
|
*/
|
442 |
|
|
#define SA11X0_PWR_MGR_CONTROL SA11X0_REGISTER(0x10020000)
|
443 |
|
|
#define SA11X0_PWR_MGR_SLEEP_STATUS SA11X0_REGISTER(0x10020004)
|
444 |
|
|
#define SA11X0_PWR_MGR_SCRATCHPAD SA11X0_REGISTER(0x10020008)
|
445 |
|
|
#define SA11X0_PWR_MGR_WAKEUP_ENABLE SA11X0_REGISTER(0x1002000C)
|
446 |
|
|
#define SA11X0_PWR_MGR_GENERAL_CONFIG SA11X0_REGISTER(0x10020010)
|
447 |
|
|
#define SA11X0_PWR_MGR_PLL_CONFIG SA11X0_REGISTER(0x10020014)
|
448 |
|
|
#define SA11X0_PWR_MGR_GPIO_SLEEP_STATE SA11X0_REGISTER(0x10020018)
|
449 |
|
|
#define SA11X0_PWR_MGR_OSC_STATUS SA11X0_REGISTER(0x1002001C)
|
450 |
|
|
|
451 |
|
|
/*
|
452 |
|
|
* SA-1100 Control Register Bit Field Definitions
|
453 |
|
|
*/
|
454 |
|
|
#define SA11X0_NO_FORCE_SLEEP_MODE 0x00000000
|
455 |
|
|
#define SA11X0_FORCE_SLEEP_MODE 0x00000001
|
456 |
|
|
#define SA11X0_SLEEP_MODE_MASK 0x00000001
|
457 |
|
|
|
458 |
|
|
/*
|
459 |
|
|
* SA-1100 Power Management Configuration Register Bit Field Definitions
|
460 |
|
|
*/
|
461 |
|
|
#define SA11X0_NO_STOP_OSC_DURING_SLEEP 0x00000000
|
462 |
|
|
#define SA11X0_STOP_OSC_DURING_SLEEP 0x00000001
|
463 |
|
|
#define SA11X0_OSC_DURING_SLEEP_MASK 0x00000001
|
464 |
|
|
#define SA11X0_DRIVE_PCMCIA_DURING_SLEEP 0x00000000
|
465 |
|
|
#define SA11X0_FLOAT_PCMCIA_DURING_SLEEP 0x00000002
|
466 |
|
|
#define SA11X0_PCMCIA_DURING_SLEEP_MASK 0x00000002
|
467 |
|
|
#define SA11X0_DRIVE_CHIPSEL_DURING_SLEEP 0x00000000
|
468 |
|
|
#define SA11X0_FLOAT_CHIPSEL_DURING_SLEEP 0x00000004
|
469 |
|
|
#define SA11X0_CHIPSEL_DURING_SLEEP_MASK 0x00000004
|
470 |
|
|
#define SA11X0_WAIT_OSC_STABLE 0x00000000
|
471 |
|
|
#define SA11X0_FORCE_OSC_ENABLE_ON 0x00000008
|
472 |
|
|
#define SA11X0_OSC_STABLE_MASK 0x00000008
|
473 |
|
|
|
474 |
|
|
/*
|
475 |
|
|
* SA-1100 PLL Configuration Register Bit Field Definitions
|
476 |
|
|
*/
|
477 |
|
|
#define SA11X0_CLOCK_SPEED_59_0_MHz 0x00000000
|
478 |
|
|
#define SA11X0_CLOCK_SPEED_73_7_MHz 0x00000001
|
479 |
|
|
#define SA11X0_CLOCK_SPEED_88_5_MHz 0x00000002
|
480 |
|
|
#define SA11X0_CLOCK_SPEED_103_2_MHz 0x00000003
|
481 |
|
|
#define SA11X0_CLOCK_SPEED_118_0_MHz 0x00000004
|
482 |
|
|
#define SA11X0_CLOCK_SPEED_132_7_MHz 0x00000005
|
483 |
|
|
#define SA11X0_CLOCK_SPEED_147_5_MHz 0x00000006
|
484 |
|
|
#define SA11X0_CLOCK_SPEED_162_2_MHz 0x00000007
|
485 |
|
|
#define SA11X0_CLOCK_SPEED_176_9_MHz 0x00000008
|
486 |
|
|
#define SA11X0_CLOCK_SPEED_191_7_MHz 0x00000009
|
487 |
|
|
#define SA11X0_CLOCK_SPEED_206_4_MHz 0x0000000A
|
488 |
|
|
#define SA11X0_CLOCK_SPEED_221_2_MHz 0x0000000B
|
489 |
|
|
|
490 |
|
|
/*
|
491 |
|
|
* SA-1100 Power Manager Wakeup Register Bit Field Definitions
|
492 |
|
|
*/
|
493 |
|
|
#define SA11X0_WAKEUP_ENABLE(x) ((x) & 0x8FFFFFFF)
|
494 |
|
|
|
495 |
|
|
/*
|
496 |
|
|
* SA-1100 Power Manager Sleep Status Bit Field Definitions
|
497 |
|
|
*/
|
498 |
|
|
#define SA11X0_SOFTWARE_SLEEP_STATUS 0x00000001
|
499 |
|
|
#define SA11X0_BATTERY_FAULT_STATUS 0x00000002
|
500 |
|
|
#define SA11X0_VDD_FAULT_STATUS 0x00000004
|
501 |
|
|
#define SA11X0_DRAM_CONTROL_HOLD 0x00000008
|
502 |
|
|
#define SA11X0_PERIPHERAL_CONTROL_HOLD 0x00000010
|
503 |
|
|
|
504 |
|
|
/*
|
505 |
|
|
* SA-1100 Power Manager Oscillator Status Register Bit Field Definitions
|
506 |
|
|
*/
|
507 |
|
|
#define SA11X0_OSCILLATOR_STATUS 0x00000001
|
508 |
|
|
|
509 |
|
|
/*
|
510 |
|
|
* SA-1110 GPCLK Register Definitions
|
511 |
|
|
*/
|
512 |
|
|
#define SA1110_GPCLK_CONTROL_0 SA11X0_REGISTER(0x00020060)
|
513 |
|
|
#define SA1110_GPCLK_CONTROL_1 SA11X0_REGISTER(0x0002006C)
|
514 |
|
|
#define SA1110_GPCLK_CONTROL_2 SA11X0_REGISTER(0x00020070)
|
515 |
|
|
|
516 |
|
|
/* GPCLK Control Register 0 */
|
517 |
|
|
#define SA1110_GPCLK_SUS_GPCLK 0
|
518 |
|
|
#define SA1110_GPCLK_SUS_UART 1
|
519 |
|
|
#define SA1110_GPCLK_SCE 2
|
520 |
|
|
#define SA1110_GPCLK_SCD_IN 0
|
521 |
|
|
#define SA1110_GPCLK_SCD_OUT 4
|
522 |
|
|
|
523 |
|
|
/*
|
524 |
|
|
* SA11X0 Peripheral Port Controller Register Definitions
|
525 |
|
|
*/
|
526 |
|
|
#define SA11X0_PPC_PIN_DIRECTION SA11X0_REGISTER(0x10060000)
|
527 |
|
|
#define SA11X0_PPC_PIN_STATE SA11X0_REGISTER(0x10060004)
|
528 |
|
|
#define SA11X0_PPC_PIN_ASSIGNMENT SA11X0_REGISTER(0x10060008)
|
529 |
|
|
#define SA11X0_PPC_PIN_SLEEP_MODE_DIR SA11X0_REGISTER(0x1006000C)
|
530 |
|
|
#define SA11X0_PPC_PIN_FLAG SA11X0_REGISTER(0x10060010)
|
531 |
|
|
|
532 |
|
|
/*
|
533 |
|
|
* SA11X0 PPC Bit Field Definitions
|
534 |
|
|
*/
|
535 |
|
|
#define SA11X0_PPC_LCD_PIN_0_DIR_INPUT 0x00000000
|
536 |
|
|
#define SA11X0_PPC_LCD_PIN_0_DIR_OUTPUT 0x00000001
|
537 |
|
|
#define SA11X0_PPC_LCD_PIN_0_DIR_MASK 0x00000001
|
538 |
|
|
#define SA11X0_PPC_LCD_PIN_1_DIR_INPUT 0x00000000
|
539 |
|
|
#define SA11X0_PPC_LCD_PIN_1_DIR_OUTPUT 0x00000002
|
540 |
|
|
#define SA11X0_PPC_LCD_PIN_1_DIR_MASK 0x00000002
|
541 |
|
|
#define SA11X0_PPC_LCD_PIN_2_DIR_INPUT 0x00000000
|
542 |
|
|
#define SA11X0_PPC_LCD_PIN_2_DIR_OUTPUT 0x00000004
|
543 |
|
|
#define SA11X0_PPC_LCD_PIN_2_DIR_MASK 0x00000004
|
544 |
|
|
#define SA11X0_PPC_LCD_PIN_3_DIR_INPUT 0x00000000
|
545 |
|
|
#define SA11X0_PPC_LCD_PIN_3_DIR_OUTPUT 0x00000008
|
546 |
|
|
#define SA11X0_PPC_LCD_PIN_3_DIR_MASK 0x00000008
|
547 |
|
|
#define SA11X0_PPC_LCD_PIN_4_DIR_INPUT 0x00000000
|
548 |
|
|
#define SA11X0_PPC_LCD_PIN_4_DIR_OUTPUT 0x00000010
|
549 |
|
|
#define SA11X0_PPC_LCD_PIN_4_DIR_MASK 0x00000010
|
550 |
|
|
#define SA11X0_PPC_LCD_PIN_5_DIR_INPUT 0x00000000
|
551 |
|
|
#define SA11X0_PPC_LCD_PIN_5_DIR_OUTPUT 0x00000020
|
552 |
|
|
#define SA11X0_PPC_LCD_PIN_5_DIR_MASK 0x00000020
|
553 |
|
|
#define SA11X0_PPC_LCD_PIN_6_DIR_INPUT 0x00000000
|
554 |
|
|
#define SA11X0_PPC_LCD_PIN_6_DIR_OUTPUT 0x00000040
|
555 |
|
|
#define SA11X0_PPC_LCD_PIN_6_DIR_MASK 0x00000040
|
556 |
|
|
#define SA11X0_PPC_LCD_PIN_7_DIR_INPUT 0x00000000
|
557 |
|
|
#define SA11X0_PPC_LCD_PIN_7_DIR_OUTPUT 0x00000080
|
558 |
|
|
#define SA11X0_PPC_LCD_PIN_7_DIR_MASK 0x00000080
|
559 |
|
|
#define SA11X0_PPC_LCD_PIXCLK_DIR_INPUT 0x00000000
|
560 |
|
|
#define SA11X0_PPC_LCD_PIXCLK_DIR_OUTPUT 0x00000100
|
561 |
|
|
#define SA11X0_PPC_LCD_PIXCLK_DIR_MASK 0x00000100
|
562 |
|
|
#define SA11X0_PPC_LCD_LINECLK_DIR_INPUT 0x00000000
|
563 |
|
|
#define SA11X0_PPC_LCD_LINECLK_DIR_OUTPUT 0x00000200
|
564 |
|
|
#define SA11X0_PPC_LCD_LINECLK_DIR_MASK 0x00000200
|
565 |
|
|
#define SA11X0_PPC_LCD_FRAMECLK_DIR_INPUT 0x00000000
|
566 |
|
|
#define SA11X0_PPC_LCD_FRAMECLK_DIR_OUTPUT 0x00000400
|
567 |
|
|
#define SA11X0_PPC_LCD_FRAMECLK_DIR_MASK 0x00000400
|
568 |
|
|
#define SA11X0_PPC_LCD_AC_BIAS_DIR_INPUT 0x00000000
|
569 |
|
|
#define SA11X0_PPC_LCD_AC_BIAS_DIR_OUTPUT 0x00000800
|
570 |
|
|
#define SA11X0_PPC_LCD_AC_BIAS_DIR_MASK 0x00000800
|
571 |
|
|
#define SA11X0_PPC_SERIAL_PORT_1_TX_DIR_INPUT 0x00000000
|
572 |
|
|
#define SA11X0_PPC_SERIAL_PORT_1_TX_DIR_OUTPUT 0x00001000
|
573 |
|
|
#define SA11X0_PPC_SERIAL_PORT_1_TX_DIR_MASK 0x00001000
|
574 |
|
|
#define SA11X0_PPC_SERIAL_PORT_1_RX_DIR_INPUT 0x00000000
|
575 |
|
|
#define SA11X0_PPC_SERIAL_PORT_1_RX_DIR_OUTPUT 0x00002000
|
576 |
|
|
#define SA11X0_PPC_SERIAL_PORT_1_RX_DIR_MASK 0x00002000
|
577 |
|
|
#define SA11X0_PPC_SERIAL_PORT_2_TX_DIR_INPUT 0x00000000
|
578 |
|
|
#define SA11X0_PPC_SERIAL_PORT_2_TX_DIR_OUTPUT 0x00004000
|
579 |
|
|
#define SA11X0_PPC_SERIAL_PORT_2_TX_DIR_MASK 0x00004000
|
580 |
|
|
#define SA11X0_PPC_SERIAL_PORT_2_RX_DIR_INPUT 0x00000000
|
581 |
|
|
#define SA11X0_PPC_SERIAL_PORT_2_RX_DIR_OUTPUT 0x00008000
|
582 |
|
|
#define SA11X0_PPC_SERIAL_PORT_2_RX_DIR_MASK 0x00008000
|
583 |
|
|
#define SA11X0_PPC_SERIAL_PORT_3_TX_DIR_INPUT 0x00000000
|
584 |
|
|
#define SA11X0_PPC_SERIAL_PORT_3_TX_DIR_OUTPUT 0x00010000
|
585 |
|
|
#define SA11X0_PPC_SERIAL_PORT_3_TX_DIR_MASK 0x00010000
|
586 |
|
|
#define SA11X0_PPC_SERIAL_PORT_3_RX_DIR_INPUT 0x00000000
|
587 |
|
|
#define SA11X0_PPC_SERIAL_PORT_3_RX_DIR_OUTPUT 0x00020000
|
588 |
|
|
#define SA11X0_PPC_SERIAL_PORT_3_RX_DIR_MASK 0x00020000
|
589 |
|
|
#define SA11X0_PPC_SERIAL_PORT_4_TX_DIR_INPUT 0x00000000
|
590 |
|
|
#define SA11X0_PPC_SERIAL_PORT_4_TX_DIR_OUTPUT 0x00040000
|
591 |
|
|
#define SA11X0_PPC_SERIAL_PORT_4_TX_DIR_MASK 0x00040000
|
592 |
|
|
#define SA11X0_PPC_SERIAL_PORT_4_RX_DIR_INPUT 0x00000000
|
593 |
|
|
#define SA11X0_PPC_SERIAL_PORT_4_RX_DIR_OUTPUT 0x00080000
|
594 |
|
|
#define SA11X0_PPC_SERIAL_PORT_4_RX_DIR_MASK 0x00080000
|
595 |
|
|
#define SA11X0_PPC_SERIAL_PORT_4_SERCLK_INPUT 0x00000000
|
596 |
|
|
#define SA11X0_PPC_SERIAL_PORT_4_SERCLK_OUTPUT 0x00100000
|
597 |
|
|
#define SA11X0_PPC_SERIAL_PORT_4_SERCLK_MASK 0x00100000
|
598 |
|
|
#define SA11X0_PPC_SERIAL_PORT_4_SERFRM_INPUT 0x00000000
|
599 |
|
|
#define SA11X0_PPC_SERIAL_PORT_4_SERFRM_OUTPUT 0x00200000
|
600 |
|
|
#define SA11X0_PPC_SERIAL_PORT_4_SERFRM_MASK 0x00200000
|
601 |
|
|
|
602 |
|
|
#define SA11X0_PPC_UART_PIN_NOT_REASSIGNED 0x00000000
|
603 |
|
|
#define SA11X0_PPC_UART_PIN_REASSIGNED 0x00001000
|
604 |
|
|
#define SA11X0_PPC_UART_PIN_REASSIGNMENT_MASK 0x00001000
|
605 |
|
|
#define SA11X0_PPC_SSP_PIN_NOT_REASSIGNED 0x00000000
|
606 |
|
|
#define SA11X0_PPC_SSP_PIN_REASSIGNED 0x00040000
|
607 |
|
|
#define SA11X0_PPC_SSP_PIN_REASSIGNMENT_MASK 0x00040000
|
608 |
|
|
|
609 |
|
|
/*
|
610 |
|
|
* SA-1100 MCP Registers
|
611 |
|
|
*/
|
612 |
|
|
#define SA11X0_MCP_CONTROL_0 SA11X0_REGISTER(0x00060000)
|
613 |
|
|
#define SA11X0_MCP_DATA_0 SA11X0_REGISTER(0x00060008)
|
614 |
|
|
#define SA11X0_MCP_DATA_1 SA11X0_REGISTER(0x0006000C)
|
615 |
|
|
#define SA11X0_MCP_DATA_2 SA11X0_REGISTER(0x00060010)
|
616 |
|
|
#define SA11X0_MCP_STATUS SA11X0_REGISTER(0x00060018)
|
617 |
|
|
#define SA11X0_MCP_CONTROL_1 SA11X0_REGISTER(0x00060030)
|
618 |
|
|
|
619 |
|
|
/*
|
620 |
|
|
* SA-1100 Memory Configuration Registers
|
621 |
|
|
*/
|
622 |
|
|
#define SA11X0_DRAM_CONFIGURATION SA11X0_REGISTER(0x20000000)
|
623 |
|
|
#define SA11X0_DRAM0_CAS_0 SA11X0_REGISTER(0x20000004)
|
624 |
|
|
#define SA11X0_DRAM0_CAS_1 SA11X0_REGISTER(0x20000008)
|
625 |
|
|
#define SA11X0_DRAM0_CAS_2 SA11X0_REGISTER(0x2000000C)
|
626 |
|
|
#define SA11X0_STATIC_CONTROL_0 SA11X0_REGISTER(0x20000010)
|
627 |
|
|
#define SA11X0_STATIC_CONTROL_1 SA11X0_REGISTER(0x20000014)
|
628 |
|
|
#define SA11X0_EXP_BUS_CONFIGURATION SA11X0_REGISTER(0x20000018)
|
629 |
|
|
#define SA11X0_REFRESH_CONFIGURATION SA11X0_REGISTER(0x2000001C)
|
630 |
|
|
#define SA11X0_DRAM2_CAS_0 SA11X0_REGISTER(0x20000020)
|
631 |
|
|
#define SA11X0_DRAM2_CAS_1 SA11X0_REGISTER(0x20000024)
|
632 |
|
|
#define SA11X0_DRAM2_CAS_2 SA11X0_REGISTER(0x20000028)
|
633 |
|
|
#define SA11X0_STATIC_CONTROL_2 SA11X0_REGISTER(0x2000002C)
|
634 |
|
|
#define SA11X0_SMROM_CONFIGURATION SA11X0_REGISTER(0x20000030)
|
635 |
|
|
|
636 |
|
|
/*
|
637 |
|
|
* SA-1100 DRAM Configuration Bit Field Definitions
|
638 |
|
|
*/
|
639 |
|
|
#define SA11X0_DRAM_BANK_0_DISABLED 0x00000000
|
640 |
|
|
#define SA11X0_DRAM_BANK_0_ENABLED 0x00000001
|
641 |
|
|
#define SA11X0_DRAM_BANK_0_ENABLE_MASK 0x00000001
|
642 |
|
|
#define SA11X0_DRAM_BANK_1_DISABLED 0x00000000
|
643 |
|
|
#define SA11X0_DRAM_BANK_1_ENABLED 0x00000002
|
644 |
|
|
#define SA11X0_DRAM_BANK_1_ENABLE_MASK 0x00000002
|
645 |
|
|
#define SA11X0_DRAM_BANK_2_DISABLED 0x00000000
|
646 |
|
|
#define SA11X0_DRAM_BANK_2_ENABLED 0x00000004
|
647 |
|
|
#define SA11X0_DRAM_BANK_2_ENABLE_MASK 0x00000004
|
648 |
|
|
#define SA11X0_DRAM_BANK_3_DISABLED 0x00000000
|
649 |
|
|
#define SA11X0_DRAM_BANK_3_ENABLED 0x00000008
|
650 |
|
|
#define SA11X0_DRAM_BANK_3_ENABLE_MASK 0x00000008
|
651 |
|
|
#define SA11X0_DRAM_ROW_ADDRESS_BITS_9 0x00000000
|
652 |
|
|
#define SA11X0_DRAM_ROW_ADDRESS_BITS_10 0x00000010
|
653 |
|
|
#define SA11X0_DRAM_ROW_ADDRESS_BITS_11 0x00000020
|
654 |
|
|
#define SA11X0_DRAM_ROW_ADDRESS_BITS_12 0x00000030
|
655 |
|
|
#define SA11X0_DRAM_ROW_ADDRESS_BITS_MASK 0x00000030
|
656 |
|
|
#define SA11X0_DRAM_CLOCK_CPU_CLOCK 0x00000000
|
657 |
|
|
#define SA11X0_DRAM_CLOCK_CPU_CLOCK_DIV_2 0x00000040
|
658 |
|
|
#define SA11X0_DRAM_CLOCK_CPU_CLOCK_MASK 0x00000040
|
659 |
|
|
#define SA11X0_DRAM_RAS_PRECHARGE(x) (((x) & 0xF) << 7)
|
660 |
|
|
#define SA11X0_DRAM_CAS_BEFORE_RAS(x) (((x) & 0xF) << 11)
|
661 |
|
|
#define SA11X0_DATA_INPUT_LATCH_WITH_CAS 0x00000000
|
662 |
|
|
#define SA11X0_DATA_INPUT_LATCH_CAS_PLUS_ONE 0x00008000
|
663 |
|
|
#define SA11X0_DATA_INPUT_LATCH_CAS_PLUS_TWO 0x00010000
|
664 |
|
|
#define SA11X0_DATA_INPUT_LATCH_CAS_PLUS_THREE 0x00018000
|
665 |
|
|
#define SA11X0_DRAM_REFRESH_INTERVAL(x) (((x) & 0x7FFF) << 17)
|
666 |
|
|
|
667 |
|
|
/*
|
668 |
|
|
* SA-1100 Static Memory Control Register Bit Field Definitions
|
669 |
|
|
*/
|
670 |
|
|
#define SA11X0_STATIC_ROM_TYPE_FLASH 0x00000000
|
671 |
|
|
#define SA11X0_STATIC_ROM_TYPE_SRAM 0x00000001
|
672 |
|
|
#define SA11X0_STATIC_ROM_TYPE_BURST_OF_4_ROM 0x00000002
|
673 |
|
|
#define SA11X0_STATIC_ROM_TYPE_BURST_OF_8_ROM 0x00000003
|
674 |
|
|
#define SA11X0_STATIC_ROM_TYPE_MASK 0x00000003
|
675 |
|
|
#define SA11X0_STATIC_ROM_BUS_WIDTH_32_BITS 0x00000000
|
676 |
|
|
#define SA11X0_STATIC_ROM_BUS_WIDTH_16_BITS 0x00000004
|
677 |
|
|
#define SA11X0_STATIC_ROM_BUS_WIDTH_MASK 0x00000004
|
678 |
|
|
#define SA11X0_STATIC_ROM_DELAY_FIRST_ACCESS(x) (((x) & 0x1F) << 3)
|
679 |
|
|
#define SA11X0_STATIC_ROM_DELAY_NEXT_ACCESS(x) (((x) & 0x1F) << 8)
|
680 |
|
|
#define SA11X0_STATIC_ROM_RECOVERY(x) (((x) & 0x7) << 13)
|
681 |
|
|
|
682 |
|
|
#define SA11X0_STATIC_ROM_BANK_0(x) (((x) & 0xFFFF) << 0)
|
683 |
|
|
#define SA11X0_STATIC_ROM_BANK_1(x) (((x) & 0xFFFF) << 16)
|
684 |
|
|
#define SA11X0_STATIC_ROM_BANK_2(x) (((x) & 0xFFFF) << 0)
|
685 |
|
|
#define SA11X0_STATIC_ROM_BANK_3(x) (((x) & 0xFFFF) << 16)
|
686 |
|
|
|
687 |
|
|
/*
|
688 |
|
|
* SA-1100 GPIO Register Definitions
|
689 |
|
|
*/
|
690 |
|
|
#define SA11X0_GPIO_PIN_0 (1 << 0)
|
691 |
|
|
#define SA11X0_GPIO_PIN_1 (1 << 1)
|
692 |
|
|
#define SA11X0_GPIO_PIN_2 (1 << 2)
|
693 |
|
|
#define SA11X0_GPIO_PIN_3 (1 << 3)
|
694 |
|
|
#define SA11X0_GPIO_PIN_4 (1 << 4)
|
695 |
|
|
#define SA11X0_GPIO_PIN_5 (1 << 5)
|
696 |
|
|
#define SA11X0_GPIO_PIN_6 (1 << 6)
|
697 |
|
|
#define SA11X0_GPIO_PIN_7 (1 << 7)
|
698 |
|
|
#define SA11X0_GPIO_PIN_8 (1 << 8)
|
699 |
|
|
#define SA11X0_GPIO_PIN_9 (1 << 9)
|
700 |
|
|
#define SA11X0_GPIO_PIN_10 (1 << 10)
|
701 |
|
|
#define SA11X0_GPIO_PIN_11 (1 << 11)
|
702 |
|
|
#define SA11X0_GPIO_PIN_12 (1 << 12)
|
703 |
|
|
#define SA11X0_GPIO_PIN_13 (1 << 13)
|
704 |
|
|
#define SA11X0_GPIO_PIN_14 (1 << 14)
|
705 |
|
|
#define SA11X0_GPIO_PIN_15 (1 << 15)
|
706 |
|
|
#define SA11X0_GPIO_PIN_16 (1 << 16)
|
707 |
|
|
#define SA11X0_GPIO_PIN_17 (1 << 17)
|
708 |
|
|
#define SA11X0_GPIO_PIN_18 (1 << 18)
|
709 |
|
|
#define SA11X0_GPIO_PIN_19 (1 << 19)
|
710 |
|
|
#define SA11X0_GPIO_PIN_20 (1 << 20)
|
711 |
|
|
#define SA11X0_GPIO_PIN_21 (1 << 21)
|
712 |
|
|
#define SA11X0_GPIO_PIN_22 (1 << 22)
|
713 |
|
|
#define SA11X0_GPIO_PIN_23 (1 << 23)
|
714 |
|
|
#define SA11X0_GPIO_PIN_24 (1 << 24)
|
715 |
|
|
#define SA11X0_GPIO_PIN_25 (1 << 25)
|
716 |
|
|
#define SA11X0_GPIO_PIN_26 (1 << 26)
|
717 |
|
|
#define SA11X0_GPIO_PIN_27 (1 << 27)
|
718 |
|
|
|
719 |
|
|
#define SA11X0_GPIO_PIN_LEVEL SA11X0_REGISTER(0x10040000)
|
720 |
|
|
#define SA11X0_GPIO_PIN_DIRECTION SA11X0_REGISTER(0x10040004)
|
721 |
|
|
#define SA11X0_GPIO_PIN_OUTPUT_SET SA11X0_REGISTER(0x10040008)
|
722 |
|
|
#define SA11X0_GPIO_PIN_OUTPUT_CLEAR SA11X0_REGISTER(0x1004000C)
|
723 |
|
|
#define SA11X0_GPIO_RISING_EDGE_DETECT SA11X0_REGISTER(0x10040010)
|
724 |
|
|
#define SA11X0_GPIO_FALLING_EDGE_DETECT SA11X0_REGISTER(0x10040014)
|
725 |
|
|
#define SA11X0_GPIO_EDGE_DETECT_STATUS SA11X0_REGISTER(0x10040018)
|
726 |
|
|
#define SA11X0_GPIO_ALTERNATE_FUNCTION SA11X0_REGISTER(0x1004001C)
|
727 |
|
|
|
728 |
|
|
#endif /* __HAL_SA11X0_H__ */
|