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

4.104.114.84.95
Last change on this file since a6c5a6d1 was a6c5a6d1, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/09/06 at 11:10:50

Remove stray whitespaces.

  • Property mode set to 100644
File size: 12.1 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                0xFFC00000
37#define PLL_DIV                0xFFC00004
38#define VR_CTL                 0xFFC00008
39#define PLL_STAT               0xFFC0000C
40#define PLL_LOCKCNT            0xFFC00010
41#define SWRST                  0xFFC00100
42#define SYSCR                  0xFFC00104
43
44/* SPI Controller           Chapter 10 */
45#define SPI_CTL                0xFFC00500
46#define SPI_FLG                0xFFC00504
47#define SPI_STAT               0xFFC00508
48#define SPI_TDBR               0xFFC0050C
49#define SPI_RDBR               0xFFC00510
50#define SPI_BAUD               0xFFC00514
51#define SPI_SHADOW             0xFFC00518
52
53/* SPORT0 Controller */
54#define SPORT0_TCR1            0xFFC00800
55#define SPORT0_TCR2            0xFFC00804
56#define SPORT0_TCLKDIV         0xFFC00808
57#define SPORT0_TFSDIV          0xFFC0080C
58#define SPORT0_TX              0xFFC00810
59#define SPORT0_RX              0xFFC00818
60#define SPORT0_RCR1            0xFFC00820
61#define SPORT0_RCR2            0xFFC00824
62#define SPORT0_RCLKDIV         0xFFC00828
63#define SPORT0_RFSDIV          0xFFC0082C
64#define SPORT0_STAT            0xFFC00830
65#define SPORT0_CHNL            0xFFC00834
66#define SPORT0_MCMC1           0xFFC00838
67#define SPORT0_MCMC2           0xFFC0083C
68#define SPORT0_MTCS0           0xFFC00840
69#define SPORT0_MTCS1           0xFFC00844
70#define SPORT0_MTCS2           0xFFC00848
71#define SPORT0_MTCS3           0xFFC0084C
72#define SPORT0_MRCS0           0xFFC00850
73#define SPORT0_MRCS1           0xFFC00854
74#define SPORT0_MRCS2           0xFFC00858
75#define SPORT0_MRCS3           0xFFC0085C
76
77/* Parallel Peripheral Interface (PPI) Chapter 11 */
78 
79#define PPI_CONTROL            0xFFC01000
80#define PPI_STATUS             0xFFC01004
81#define PPI_COUNT              0xFFC01008
82#define PPI_DELAY              0xFFC0100C
83#define PPI_FRAME              0xFFC01010
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            0xFFC00900
111#define SPORT1_TCR2            0xFFC00904
112#define SPORT1_TCLKDIV         0xFFC00908
113#define SPORT1_TFSDIV          0xFFC0090C
114#define SPORT1_TX              0xFFC00910
115#define SPORT1_RX              0xFFC00918
116#define SPORT1_RCR1            0xFFC00920
117#define SPORT1_RCR2            0xFFC00924
118#define SPORT1_RCLKDIV         0xFFC00928
119#define SPORT1_RFSDIV          0xFFC0092C
120#define SPORT1_STAT            0xFFC00930
121#define SPORT1_CHNL            0xFFC00934
122#define SPORT1_MCMC1           0xFFC00938
123#define SPORT1_MCMC2           0xFFC0093C
124#define SPORT1_MTCS0           0xFFC00940
125#define SPORT1_MTCS1           0xFFC00944
126#define SPORT1_MTCS2           0xFFC00948
127#define SPORT1_MTCS3           0xFFC0094C
128#define SPORT1_MRCS0           0xFFC00950
129#define SPORT1_MRCS1           0xFFC00954
130#define SPORT1_MRCS2           0xFFC00958
131#define SPORT1_MRCS3           0xFFC0095C
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               0xFFC00400
193#define UART_RBR               0xFFC00400
194#define UART_DLL               0xFFC00400
195#define UART_IER               0xFFC00404
196#define UART_DLH               0xFFC00404
197#define UART_IIR               0xFFC00408
198#define UART_LCR               0xFFC0040C
199#define UART_MCR               0xFFC00410
200#define UART_LSR               0xFFC00414
201
202#define UART_SCR               0xFFC0041C
203#define UART_GCTL              0xFFC00424
204
205/*
206 * UART CONTROLLER MASKS
207 */
208
209/* UART_LCR */
210#define DLAB                   0x80
211#define SB                     0x40
212#define STP                    0x20
213#define EPS                    0x10
214#define PEN                    0x08
215#define STB                    0x04
216#define WLS(x)                 ((x-5) & 0x03)
217
218#define DLAB_P                 0x07
219#define SB_P                   0x06
220#define STP_P                  0x05
221#define EPS_P                  0x04
222#define PEN_P                  0x03
223#define STB_P                  0x02
224#define WLS_P1                 0x01
225#define WLS_P0                 0x00
226
227/* UART_MCR */
228#define LOOP_ENA               0x10
229#define LOOP_ENA_P             0x04
230
231/* UART_LSR */
232#define TEMT                   0x40
233#define THRE                   0x20
234#define BI                     0x10
235#define FE                     0x08
236#define PE                     0x04
237#define OE                     0x02
238#define DR                     0x01
239
240#define TEMP_P                 0x06
241#define THRE_P                 0x05
242#define BI_P                   0x04
243#define FE_P                   0x03
244#define PE_P                   0x02
245#define OE_P                   0x01
246#define DR_P                   0x00
247
248/* UART_IER */
249#define ELSI                   0x04
250#define ETBEI                  0x02
251#define ERBFI                  0x01
252
253#define ELSI_P                 0x02
254#define ETBEI_P                0x01
255#define ERBFI_P                0x00
256
257/* UART_IIR */
258#define STATUS(x)              ((x << 1) & 0x06)
259#define NINT                   0x01
260#define STATUS_P1              0x02
261#define STATUS_P0              0x01
262#define NINT_P                 0x00
263
264/* UART_GCTL */
265#define FFE                    0x20
266#define FPE                    0x10
267#define RPOLC                  0x08
268#define TPOLC                  0x04
269#define IREN                   0x02
270#define UCEN                   0x01
271
272#define FFE_P                  0x05
273#define FPE_P                  0x04
274#define RPOLC_P                0x03
275#define TPOLC_P                0x02
276#define IREN_P                 0x01
277#define UCEN_P                 0x00
278
279/* General Purpose IO        Chapter 14*/
280#define FIO_FLAG_D             0xFFC00700
281#define FIO_FLAG_C             0xFFC00704 
282#define FIO_FLAG_S             0xFFC00708 
283#define FIO_FLAG_T             0xFFC0070C 
284#define FIO_MASKA_D            0xFFC00710 
285#define FIO_MASKA_C            0xFFC00714 
286#define FIO_MASKA_S            0xFFC00718
287#define FIO_MASKA_T            0xFFC0071C
288#define FIO_MASKB_D            0xFFC00720
289#define FIO_MASKB_C            0xFFC00724
290#define FIO_MASKB_S            0xFFC00728
291#define FIO_MASKB_T            0xFFC0072C
292#define FIO_DIR                0xFFC00730
293#define FIO_POLAR              0xFFC00734
294#define FIO_EDGE               0xFFC00738
295#define FIO_BOTH               0xFFC0073C
296#define FIO_INEN               0xFFC00740
297
298/*  General Purpose IO Masks */
299#define PF0                    0x0001
300#define PF1                    0x0002
301#define PF2                    0x0004
302#define PF3                    0x0008
303#define PF4                    0x0010
304#define PF5                    0x0020
305#define PF6                    0x0040
306#define PF7                    0x0080
307#define PF8                    0x0100
308#define PF9                    0x0200
309#define PF10                   0x0400
310#define PF11                   0x0800
311#define PF12                   0x1000
312#define PF13                   0x2000
313#define PF14                   0x4000
314#define PF15                   0x8000
315 
316
317/* TIMER 0, 1, 2            Chapter 15 */
318#define TIMER0_CONFIG          0xFFC00600
319#define TIMER0_COUNTER         0xFFC00604
320#define TIMER0_PERIOD          0xFFC00608
321#define TIMER0_WIDTH           0xFFC0060C
322
323#define TIMER1_CONFIG          0xFFC00610 
324#define TIMER1_COUNTER         0xFFC00614       
325#define TIMER1_PERIOD          0xFFC00618         
326#define TIMER1_WIDTH           0xFFC0061C         
327
328#define TIMER2_CONFIG          0xFFC00620 
329#define TIMER2_COUNTER         0xFFC00624       
330#define TIMER2_PERIOD          0xFFC00628         
331#define TIMER2_WIDTH           0xFFC0062C         
332
333#define TIMER_ENABLE           0xFFC00640
334#define TIMER_DISABLE          0xFFC00644
335#define TIMER_STATUS           0xFFC00648
336
337/* Real Time Clock          Chapter 16 */
338#define RTC_STAT               0xFFC00300
339#define RTC_ICTL               0xFFC00304
340#define RTC_ISTAT              0xFFC00308
341#define RTC_SWCNT              0xFFC0030C
342#define RTC_ALARM              0xFFC00310
343#define RTC_FAST               0xFFC00314
344#define RTC_PREN               0xFFC00314
345
346/* RTC_FAST Mask (RTC_PREN Mask) */
347#define ENABLE_PRESCALE        0x00000001
348#define PREN                   0x00000001
349
350/* Asynchronous Memory Controller EBUI, Chapter 17*/
351#define EBIU_AMGCTL            0xFFC00A00 
352#define EBIU_AMBCTL0           0xFFC00A04
353#define EBIU_AMBCTL1           0xFFC00A08
354
355/* SDRAM Controller External Bus Interface Unit */
356
357#define EBIU_SDGCTL            0xFFC00A10
358#define EBIU_SDBCTL            0xFFC00A14
359#define EBIU_SDRRC             0xFFC00A18
360#define EBIU_SDSTAT            0xFFC00A1C
361
362#ifdef __cplusplus
363}
364#endif
365
366#endif /* _RTEMS_SCORE_BFIN_H */
Note: See TracBrowser for help on using the repository browser.