source: rtems/cpukit/score/cpu/bfin/rtems/bfin/bf533.h @ ddb1867

4.104.114.84.95
Last change on this file since ddb1867 was ddb1867, checked in by Joel Sherrill <joel.sherrill@…>, on 04/17/07 at 17:10:24

2007-04-17 Joel Sherrill <joel@…>

  • rtems/bfin/bf533.h: Fix warnings about constants being too large.
  • Property mode set to 100644
File size: 12.0 KB
Line 
1/*  bfin.h
2 *
3 *  This file defines basic MMR for the Blackfin 531/532/533 CPU.
4 *  The MMR have been taken from the ADSP-BF533 Blackfin Processor
5 *  Hardware Reference from Analog Devices. Mentioned Chapters
6 *  refer to this Documentation.
7 *
8 *  The Blackfins MMRs are divided into core MMRs (0xFFE0 0000–0xFFFF FFFF)
9 *  and System MMRs (0xFFC0 0000–0xFFE0 0000). The core MMRs are defined
10 *  in bfin.h which is included.
11 *
12 *  COPYRIGHT (c) 2006.
13 *  Atos Automacao Industrial LTDA.
14 *             modified by Alain Schaefer <alain.schaefer@easc.ch>
15 *                     and Antonio Giovanini <antonio@atos.com.br>
16 *
17 *  The license and distribution terms for this file may be
18 *  found in the file LICENSE in this distribution or at
19 *  http://www.rtems.com/license/LICENSE.
20 *
21 *  $Id$
22 *
23 */
24
25#ifndef _RTEMS_BFIN_533_H
26#define _RTEMS_BFIN_533_H
27
28#include <rtems/bfin/bfin.h>
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34
35/* Clock and System Control  Chapter 8 */
36#define PLL_CTL                0xFFC00000L
37#define PLL_DIV                0xFFC00004L
38#define VR_CTL                 0xFFC00008L
39#define PLL_STAT               0xFFC0000CL
40#define PLL_LOCKCNT            0xFFC00010L
41#define SWRST                  0xFFC00100L
42#define SYSCR                  0xFFC00104L
43
44/* SPI Controller           Chapter 10 */
45#define SPI_CTL                0xFFC00500L
46#define SPI_FLG                0xFFC00504L
47#define SPI_STAT               0xFFC00508L
48#define SPI_TDBR               0xFFC0050CL
49#define SPI_RDBR               0xFFC00510L
50#define SPI_BAUD               0xFFC00514L
51#define SPI_SHADOW             0xFFC00518L
52
53/* SPORT0 Controller */
54#define SPORT0_TCR1            0xFFC00800L
55#define SPORT0_TCR2            0xFFC00804L
56#define SPORT0_TCLKDIV         0xFFC00808L
57#define SPORT0_TFSDIV          0xFFC0080CL
58#define SPORT0_TX              0xFFC00810L
59#define SPORT0_RX              0xFFC00818L
60#define SPORT0_RCR1            0xFFC00820L
61#define SPORT0_RCR2            0xFFC00824L
62#define SPORT0_RCLKDIV         0xFFC00828L
63#define SPORT0_RFSDIV          0xFFC0082CL
64#define SPORT0_STAT            0xFFC00830L
65#define SPORT0_CHNL            0xFFC00834L
66#define SPORT0_MCMC1           0xFFC00838L
67#define SPORT0_MCMC2           0xFFC0083CL
68#define SPORT0_MTCS0           0xFFC00840L
69#define SPORT0_MTCS1           0xFFC00844L
70#define SPORT0_MTCS2           0xFFC00848L
71#define SPORT0_MTCS3           0xFFC0084CL
72#define SPORT0_MRCS0           0xFFC00850L
73#define SPORT0_MRCS1           0xFFC00854L
74#define SPORT0_MRCS2           0xFFC00858L
75#define SPORT0_MRCS3           0xFFC0085CL
76
77/* Parallel Peripheral Interface (PPI) Chapter 11 */
78
79#define PPI_CONTROL            0xFFC01000L
80#define PPI_STATUS             0xFFC01004L
81#define PPI_COUNT              0xFFC01008L
82#define PPI_DELAY              0xFFC0100CL
83#define PPI_FRAME              0xFFC01010L
84
85/*********  PPI MASKS ***********/
86/*  PPI_CONTROL Masks */
87#define PORT_EN                0x00000001
88#define PORT_DIR               0x00000002
89#define XFR_TYPE               0x0000000C
90#define PORT_CFG               0x00000030
91#define FLD_SEL                0x00000040
92#define PACK_EN                0x00000080
93#define DMA32                  0x00000100
94#define SKIP_EN                0x00000200
95#define SKIP_EO                0x00000400
96#define DLENGTH                0x00003800
97#define DLEN_8                 0x0
98#define DLEN(x)                (((x-9) & 0x07) << 11)
99#define POL                    0x0000C000
100
101/* PPI_STATUS Masks */
102#define FLD                    0x00000400
103#define FT_ERR                 0x00000800
104#define OVR                    0x00001000
105#define UNDR                   0x00002000
106#define ERR_DET                0x00004000
107#define ERR_NCOR               0x00008000
108
109/* SPORT1 Controller        Chapter 12 */
110#define SPORT1_TCR1            0xFFC00900L
111#define SPORT1_TCR2            0xFFC00904L
112#define SPORT1_TCLKDIV         0xFFC00908L
113#define SPORT1_TFSDIV          0xFFC0090CL
114#define SPORT1_TX              0xFFC00910L
115#define SPORT1_RX              0xFFC00918L
116#define SPORT1_RCR1            0xFFC00920L
117#define SPORT1_RCR2            0xFFC00924L
118#define SPORT1_RCLKDIV         0xFFC00928L
119#define SPORT1_RFSDIV          0xFFC0092CL
120#define SPORT1_STAT            0xFFC00930L
121#define SPORT1_CHNL            0xFFC00934L
122#define SPORT1_MCMC1           0xFFC00938L
123#define SPORT1_MCMC2           0xFFC0093CL
124#define SPORT1_MTCS0           0xFFC00940L
125#define SPORT1_MTCS1           0xFFC00944L
126#define SPORT1_MTCS2           0xFFC00948L
127#define SPORT1_MTCS3           0xFFC0094CL
128#define SPORT1_MRCS0           0xFFC00950L
129#define SPORT1_MRCS1           0xFFC00954L
130#define SPORT1_MRCS2           0xFFC00958L
131#define SPORT1_MRCS3           0xFFC0095CL
132
133/* SPORTx_TCR1 Masks */
134#define TSPEN                  0x0001
135#define ITCLK                  0x0002
136#define TDTYPE                 0x000C
137#define TLSBIT                 0x0010
138#define ITFS                   0x0200
139#define TFSR                   0x0400
140#define DITFS                  0x0800
141#define LTFS                   0x1000
142#define LATFS                  0x2000
143#define TCKFE                  0x4000
144
145/* SPORTx_TCR2 Masks */
146#define SLEN                   0x001F
147#define TXSE                   0x0100
148#define TSFSE                  0x0200
149#define TRFST                  0x0400
150
151/* SPORTx_RCR1 Masks */
152#define RSPEN                  0x0001
153#define IRCLK                  0x0002
154#define RDTYPE                 0x000C
155#define RULAW                  0x0008
156#define RALAW                  0x000C
157#define RLSBIT                 0x0010
158#define IRFS                   0x0200
159#define RFSR                   0x0400
160#define LRFS                   0x1000
161#define LARFS                  0x2000
162#define RCKFE                  0x4000
163
164/* SPORTx_RCR2 Masks */
165#define SLEN                   0x001F
166#define RXSE                   0x0100
167#define RSFSE                  0x0200
168#define RRFST                  0x0400
169
170/* SPORTx_STAT Masks */
171#define RXNE                   0x0001
172#define RUVF                   0x0002
173#define ROVF                   0x0004
174#define TXF                    0x0008
175#define TUVF                   0x0010
176#define TOVF                   0x0020
177#define TXHRE                  0x0040
178
179/* SPORTx_MCMC1 Masks */
180#define WSIZE                  0x0000F000
181#define WOFF                   0x000003FF
182
183/* SPORTx_MCMC2 Masks */
184#define MCCRM                  0x00000003
185#define MCDTXPE                0x00000004
186#define MCDRXPE                0x00000008
187#define MCMEN                  0x00000010
188#define FSDR                   0x00000080
189#define MFD                    0x0000F000
190
191/* UART Controller          Chapter 13 */
192#define UART_THR               0xFFC00400L
193#define UART_RBR               0xFFC00400L
194#define UART_DLL               0xFFC00400L
195#define UART_IER               0xFFC00404L
196#define UART_DLH               0xFFC00404L
197#define UART_IIR               0xFFC00408L
198#define UART_LCR               0xFFC0040CL
199#define UART_MCR               0xFFC00410L
200#define UART_LSR               0xFFC00414L
201#define UART_SCR               0xFFC0041CL
202#define UART_GCTL              0xFFC00424L
203
204/*
205 * UART CONTROLLER MASKS
206 */
207
208/* UART_LCR */
209#define DLAB                   0x80
210#define SB                     0x40
211#define STP                    0x20
212#define EPS                    0x10
213#define PEN                    0x08
214#define STB                    0x04
215#define WLS(x)                 ((x-5) & 0x03)
216
217#define DLAB_P                 0x07
218#define SB_P                   0x06
219#define STP_P                  0x05
220#define EPS_P                  0x04
221#define PEN_P                  0x03
222#define STB_P                  0x02
223#define WLS_P1                 0x01
224#define WLS_P0                 0x00
225
226/* UART_MCR */
227#define LOOP_ENA               0x10
228#define LOOP_ENA_P             0x04
229
230/* UART_LSR */
231#define TEMT                   0x40
232#define THRE                   0x20
233#define BI                     0x10
234#define FE                     0x08
235#define PE                     0x04
236#define OE                     0x02
237#define DR                     0x01
238
239#define TEMP_P                 0x06
240#define THRE_P                 0x05
241#define BI_P                   0x04
242#define FE_P                   0x03
243#define PE_P                   0x02
244#define OE_P                   0x01
245#define DR_P                   0x00
246
247/* UART_IER */
248#define ELSI                   0x04
249#define ETBEI                  0x02
250#define ERBFI                  0x01
251
252#define ELSI_P                 0x02
253#define ETBEI_P                0x01
254#define ERBFI_P                0x00
255
256/* UART_IIR */
257#define STATUS(x)              ((x << 1) & 0x06)
258#define NINT                   0x01
259#define STATUS_P1              0x02
260#define STATUS_P0              0x01
261#define NINT_P                 0x00
262
263/* UART_GCTL */
264#define FFE                    0x20
265#define FPE                    0x10
266#define RPOLC                  0x08
267#define TPOLC                  0x04
268#define IREN                   0x02
269#define UCEN                   0x01
270
271#define FFE_P                  0x05
272#define FPE_P                  0x04
273#define RPOLC_P                0x03
274#define TPOLC_P                0x02
275#define IREN_P                 0x01
276#define UCEN_P                 0x00
277
278/* General Purpose IO        Chapter 14*/
279#define FIO_FLAG_D             0xFFC00700L
280#define FIO_FLAG_C             0xFFC00704L
281#define FIO_FLAG_S             0xFFC00708L
282#define FIO_FLAG_T             0xFFC0070CL
283#define FIO_MASKA_D            0xFFC00710L
284#define FIO_MASKA_C            0xFFC00714L
285#define FIO_MASKA_S            0xFFC00718L
286#define FIO_MASKA_T            0xFFC0071CL
287#define FIO_MASKB_D            0xFFC00720L
288#define FIO_MASKB_C            0xFFC00724L
289#define FIO_MASKB_S            0xFFC00728L
290#define FIO_MASKB_T            0xFFC0072CL
291#define FIO_DIR                0xFFC00730L
292#define FIO_POLAR              0xFFC00734L
293#define FIO_EDGE               0xFFC00738L
294#define FIO_BOTH               0xFFC0073CL
295#define FIO_INEN               0xFFC00740L
296
297/*  General Purpose IO Masks */
298#define PF0                    0x0001
299#define PF1                    0x0002
300#define PF2                    0x0004
301#define PF3                    0x0008
302#define PF4                    0x0010
303#define PF5                    0x0020
304#define PF6                    0x0040
305#define PF7                    0x0080
306#define PF8                    0x0100
307#define PF9                    0x0200
308#define PF10                   0x0400
309#define PF11                   0x0800
310#define PF12                   0x1000
311#define PF13                   0x2000
312#define PF14                   0x4000
313#define PF15                   0x8000
314
315
316/* TIMER 0, 1, 2            Chapter 15 */
317#define TIMER0_CONFIG          0xFFC00600L
318#define TIMER0_COUNTER         0xFFC00604L
319#define TIMER0_PERIOD          0xFFC00608L
320#define TIMER0_WIDTH           0xFFC0060CL
321
322#define TIMER1_CONFIG          0xFFC00610L
323#define TIMER1_COUNTER         0xFFC00614L
324#define TIMER1_PERIOD          0xFFC00618L
325#define TIMER1_WIDTH           0xFFC0061CL
326
327#define TIMER2_CONFIG          0xFFC00620L
328#define TIMER2_COUNTER         0xFFC00624L
329#define TIMER2_PERIOD          0xFFC00628L
330#define TIMER2_WIDTH           0xFFC0062CL
331
332#define TIMER_ENABLE           0xFFC00640L
333#define TIMER_DISABLE          0xFFC00644L
334#define TIMER_STATUS           0xFFC00648L
335
336/* Real Time Clock          Chapter 16 */
337#define RTC_STAT               0xFFC00300L
338#define RTC_ICTL               0xFFC00304L
339#define RTC_ISTAT              0xFFC00308L
340#define RTC_SWCNT              0xFFC0030CL
341#define RTC_ALARM              0xFFC00310L
342#define RTC_FAST               0xFFC00314L
343#define RTC_PREN               0xFFC00314L
344
345/* RTC_FAST Mask (RTC_PREN Mask) */
346#define ENABLE_PRESCALE        0x00000001
347#define PREN                   0x00000001
348
349/* Asynchronous Memory Controller EBUI, Chapter 17*/
350#define EBIU_AMGCTL            0xFFC00A00L
351#define EBIU_AMBCTL0           0xFFC00A04L
352#define EBIU_AMBCTL1           0xFFC00A08L
353
354/* SDRAM Controller External Bus Interface Unit */
355
356#define EBIU_SDGCTL            0xFFC00A10L
357#define EBIU_SDBCTL            0xFFC00A14L
358#define EBIU_SDRRC             0xFFC00A18L
359#define EBIU_SDSTAT            0xFFC00A1CL
360
361#ifdef __cplusplus
362}
363#endif
364
365#endif /* _RTEMS_SCORE_BFIN_H */
Note: See TracBrowser for help on using the repository browser.