1 |
584 |
jeremybenn |
/*
|
2 |
|
|
* These files are taken from the MCF523X source code example package
|
3 |
|
|
* which is available on the Freescale website. Freescale explicitly
|
4 |
|
|
* grants the redistribution and modification of these source files.
|
5 |
|
|
* The complete licensing information is available in the file
|
6 |
|
|
* LICENSE_FREESCALE.TXT.
|
7 |
|
|
*
|
8 |
|
|
* File: mcf523x_cs.h
|
9 |
|
|
* Purpose: Register and bit definitions for the MCF523X
|
10 |
|
|
*
|
11 |
|
|
* Notes:
|
12 |
|
|
*
|
13 |
|
|
*/
|
14 |
|
|
|
15 |
|
|
#ifndef __MCF523X_CS_H__
|
16 |
|
|
#define __MCF523X_CS_H__
|
17 |
|
|
|
18 |
|
|
/*********************************************************************
|
19 |
|
|
*
|
20 |
|
|
* Chip Selects (CS)
|
21 |
|
|
*
|
22 |
|
|
*********************************************************************/
|
23 |
|
|
|
24 |
|
|
/* Register read/write macros */
|
25 |
|
|
#define MCF_CS_CSAR0 (*(vuint16*)(void*)(&__IPSBAR[0x000080]))
|
26 |
|
|
#define MCF_CS_CSMR0 (*(vuint32*)(void*)(&__IPSBAR[0x000084]))
|
27 |
|
|
#define MCF_CS_CSCR0 (*(vuint16*)(void*)(&__IPSBAR[0x00008A]))
|
28 |
|
|
#define MCF_CS_CSAR1 (*(vuint16*)(void*)(&__IPSBAR[0x00008C]))
|
29 |
|
|
#define MCF_CS_CSMR1 (*(vuint32*)(void*)(&__IPSBAR[0x000090]))
|
30 |
|
|
#define MCF_CS_CSCR1 (*(vuint16*)(void*)(&__IPSBAR[0x000096]))
|
31 |
|
|
#define MCF_CS_CSAR2 (*(vuint16*)(void*)(&__IPSBAR[0x000098]))
|
32 |
|
|
#define MCF_CS_CSMR2 (*(vuint32*)(void*)(&__IPSBAR[0x00009C]))
|
33 |
|
|
#define MCF_CS_CSCR2 (*(vuint16*)(void*)(&__IPSBAR[0x0000A2]))
|
34 |
|
|
#define MCF_CS_CSAR3 (*(vuint16*)(void*)(&__IPSBAR[0x0000A4]))
|
35 |
|
|
#define MCF_CS_CSMR3 (*(vuint32*)(void*)(&__IPSBAR[0x0000A8]))
|
36 |
|
|
#define MCF_CS_CSCR3 (*(vuint16*)(void*)(&__IPSBAR[0x0000AE]))
|
37 |
|
|
#define MCF_CS_CSAR4 (*(vuint16*)(void*)(&__IPSBAR[0x0000B0]))
|
38 |
|
|
#define MCF_CS_CSMR4 (*(vuint32*)(void*)(&__IPSBAR[0x0000B4]))
|
39 |
|
|
#define MCF_CS_CSCR4 (*(vuint16*)(void*)(&__IPSBAR[0x0000BA]))
|
40 |
|
|
#define MCF_CS_CSAR5 (*(vuint16*)(void*)(&__IPSBAR[0x0000BC]))
|
41 |
|
|
#define MCF_CS_CSMR5 (*(vuint32*)(void*)(&__IPSBAR[0x0000C0]))
|
42 |
|
|
#define MCF_CS_CSCR5 (*(vuint16*)(void*)(&__IPSBAR[0x0000C6]))
|
43 |
|
|
#define MCF_CS_CSAR6 (*(vuint16*)(void*)(&__IPSBAR[0x0000C8]))
|
44 |
|
|
#define MCF_CS_CSMR6 (*(vuint32*)(void*)(&__IPSBAR[0x0000CC]))
|
45 |
|
|
#define MCF_CS_CSCR6 (*(vuint16*)(void*)(&__IPSBAR[0x0000D2]))
|
46 |
|
|
#define MCF_CS_CSAR7 (*(vuint16*)(void*)(&__IPSBAR[0x0000D4]))
|
47 |
|
|
#define MCF_CS_CSMR7 (*(vuint32*)(void*)(&__IPSBAR[0x0000D8]))
|
48 |
|
|
#define MCF_CS_CSCR7 (*(vuint16*)(void*)(&__IPSBAR[0x0000DE]))
|
49 |
|
|
#define MCF_CS_CSAR(x) (*(vuint16*)(void*)(&__IPSBAR[0x000080+((x)*0x00C)]))
|
50 |
|
|
#define MCF_CS_CSMR(x) (*(vuint32*)(void*)(&__IPSBAR[0x000084+((x)*0x00C)]))
|
51 |
|
|
#define MCF_CS_CSCR(x) (*(vuint16*)(void*)(&__IPSBAR[0x00008A+((x)*0x00C)]))
|
52 |
|
|
|
53 |
|
|
/* Bit definitions and macros for MCF_CS_CSAR */
|
54 |
|
|
#define MCF_CS_CSAR_BA(x) ((uint16)(((x)&0xFFFF0000)>>16))
|
55 |
|
|
|
56 |
|
|
/* Bit definitions and macros for MCF_CS_CSMR */
|
57 |
|
|
#define MCF_CS_CSMR_V (0x00000001)
|
58 |
|
|
#define MCF_CS_CSMR_UD (0x00000002)
|
59 |
|
|
#define MCF_CS_CSMR_UC (0x00000004)
|
60 |
|
|
#define MCF_CS_CSMR_SD (0x00000008)
|
61 |
|
|
#define MCF_CS_CSMR_SC (0x00000010)
|
62 |
|
|
#define MCF_CS_CSMR_CI (0x00000020)
|
63 |
|
|
#define MCF_CS_CSMR_AM (0x00000040)
|
64 |
|
|
#define MCF_CS_CSMR_WP (0x00000100)
|
65 |
|
|
#define MCF_CS_CSMR_BAM(x) (((x)&0x0000FFFF)<<16)
|
66 |
|
|
#define MCF_CS_CSMR_BAM_4G (0xFFFF0000)
|
67 |
|
|
#define MCF_CS_CSMR_BAM_2G (0x7FFF0000)
|
68 |
|
|
#define MCF_CS_CSMR_BAM_1G (0x3FFF0000)
|
69 |
|
|
#define MCF_CS_CSMR_BAM_1024M (0x3FFF0000)
|
70 |
|
|
#define MCF_CS_CSMR_BAM_512M (0x1FFF0000)
|
71 |
|
|
#define MCF_CS_CSMR_BAM_256M (0x0FFF0000)
|
72 |
|
|
#define MCF_CS_CSMR_BAM_128M (0x07FF0000)
|
73 |
|
|
#define MCF_CS_CSMR_BAM_64M (0x03FF0000)
|
74 |
|
|
#define MCF_CS_CSMR_BAM_32M (0x01FF0000)
|
75 |
|
|
#define MCF_CS_CSMR_BAM_16M (0x00FF0000)
|
76 |
|
|
#define MCF_CS_CSMR_BAM_8M (0x007F0000)
|
77 |
|
|
#define MCF_CS_CSMR_BAM_4M (0x003F0000)
|
78 |
|
|
#define MCF_CS_CSMR_BAM_2M (0x001F0000)
|
79 |
|
|
#define MCF_CS_CSMR_BAM_1M (0x000F0000)
|
80 |
|
|
#define MCF_CS_CSMR_BAM_1024K (0x000F0000)
|
81 |
|
|
#define MCF_CS_CSMR_BAM_512K (0x00070000)
|
82 |
|
|
#define MCF_CS_CSMR_BAM_256K (0x00030000)
|
83 |
|
|
#define MCF_CS_CSMR_BAM_128K (0x00010000)
|
84 |
|
|
#define MCF_CS_CSMR_BAM_64K (0x00000000)
|
85 |
|
|
|
86 |
|
|
/* Bit definitions and macros for MCF_CS_CSCR */
|
87 |
|
|
#define MCF_CS_CSCR_SWWS(x) (((x)&0x0007)<<0)
|
88 |
|
|
#define MCF_CS_CSCR_BSTW (0x0008)
|
89 |
|
|
#define MCF_CS_CSCR_BSTR (0x0010)
|
90 |
|
|
#define MCF_CS_CSCR_BEM (0x0020)
|
91 |
|
|
#define MCF_CS_CSCR_PS(x) (((x)&0x0003)<<6)
|
92 |
|
|
#define MCF_CS_CSCR_AA (0x0100)
|
93 |
|
|
#define MCF_CS_CSCR_IWS(x) (((x)&0x000F)<<10)
|
94 |
|
|
#define MCF_CS_CSCR_SRWS(x) (((x)&0x0003)<<14)
|
95 |
|
|
#define MCF_CS_CSCR_PS_8 (0x0040)
|
96 |
|
|
#define MCF_CS_CSCR_PS_16 (0x0080)
|
97 |
|
|
#define MCF_CS_CSCR_PS_32 (0x0000)
|
98 |
|
|
|
99 |
|
|
/********************************************************************/
|
100 |
|
|
|
101 |
|
|
#endif /* __MCF523X_CS_H__ */
|