]> begriffs open source - freertos/blob - 20100923-V6.1.0-RC2/Demo/MCF5235_GCC/include/arch/mcf523x/mcf523x_scm.h
(no commit message)
[freertos] / 20100923-V6.1.0-RC2 / Demo / MCF5235_GCC / include / arch / mcf523x / mcf523x_scm.h
1 /*\r
2  * These files are taken from the MCF523X source code example package\r
3  * which is available on the Freescale website. Freescale explicitly \r
4  * grants the redistribution and modification of these source files.\r
5  * The complete licensing information is available in the file \r
6  * LICENSE_FREESCALE.TXT.\r
7  *\r
8  * File:        mcf523x_scm.h\r
9  * Purpose:     Register and bit definitions for the MCF523X\r
10  *\r
11  * Notes:       \r
12  *      \r
13  */\r
14 \r
15 #ifndef __MCF523X_SCM_H__\r
16 #define __MCF523X_SCM_H__\r
17 \r
18 /*********************************************************************\r
19 *\r
20 * System Control Module (SCM)\r
21 *\r
22 *********************************************************************/\r
23 \r
24 /* Register read/write macros */\r
25 #define MCF_SCM_IPSBAR     (*(vuint32*)(void*)(&__IPSBAR[0x000000]))\r
26 #define MCF_SCM_RAMBAR     (*(vuint32*)(void*)(&__IPSBAR[0x000008]))\r
27 #define MCF_SCM_CRSR       (*(vuint8 *)(void*)(&__IPSBAR[0x000010]))\r
28 #define MCF_SCM_CWCR       (*(vuint8 *)(void*)(&__IPSBAR[0x000011]))\r
29 #define MCF_SCM_LPICR      (*(vuint8 *)(void*)(&__IPSBAR[0x000012]))\r
30 #define MCF_SCM_CWSR       (*(vuint8 *)(void*)(&__IPSBAR[0x000013]))\r
31 #define MCF_SCM_DMAREQC    (*(vuint32*)(void*)(&__IPSBAR[0x000014]))\r
32 #define MCF_SCM_MPARK      (*(vuint32*)(void*)(&__IPSBAR[0x00001C]))\r
33 #define MCF_SCM_MPR        (*(vuint8 *)(void*)(&__IPSBAR[0x000020]))\r
34 #define MCF_SCM_PACR0      (*(vuint8 *)(void*)(&__IPSBAR[0x000024]))\r
35 #define MCF_SCM_PACR1      (*(vuint8 *)(void*)(&__IPSBAR[0x000025]))\r
36 #define MCF_SCM_PACR2      (*(vuint8 *)(void*)(&__IPSBAR[0x000026]))\r
37 #define MCF_SCM_PACR3      (*(vuint8 *)(void*)(&__IPSBAR[0x000027]))\r
38 #define MCF_SCM_PACR4      (*(vuint8 *)(void*)(&__IPSBAR[0x000028]))\r
39 #define MCF_SCM_PACR5      (*(vuint8 *)(void*)(&__IPSBAR[0x00002A]))\r
40 #define MCF_SCM_PACR6      (*(vuint8 *)(void*)(&__IPSBAR[0x00002B]))\r
41 #define MCF_SCM_PACR7      (*(vuint8 *)(void*)(&__IPSBAR[0x00002C]))\r
42 #define MCF_SCM_PACR8      (*(vuint8 *)(void*)(&__IPSBAR[0x00002E]))\r
43 #define MCF_SCM_GPACR0     (*(vuint8 *)(void*)(&__IPSBAR[0x000030]))\r
44 \r
45 /* Bit definitions and macros for MCF_SCM_IPSBAR */\r
46 #define MCF_SCM_IPSBAR_V                 (0x00000001)\r
47 #define MCF_SCM_IPSBAR_BA(x)             (((x)&0x00000003)<<30)\r
48 \r
49 /* Bit definitions and macros for MCF_SCM_RAMBAR */\r
50 #define MCF_SCM_RAMBAR_BDE               (0x00000200)\r
51 #define MCF_SCM_RAMBAR_BA(x)             (((x)&0x0000FFFF)<<16)\r
52 \r
53 /* Bit definitions and macros for MCF_SCM_CRSR */\r
54 #define MCF_SCM_CRSR_CWDR                (0x20)\r
55 #define MCF_SCM_CRSR_EXT                 (0x80)\r
56 \r
57 /* Bit definitions and macros for MCF_SCM_CWCR */\r
58 #define MCF_SCM_CWCR_CWTIC               (0x01)\r
59 #define MCF_SCM_CWCR_CWTAVAL             (0x02)\r
60 #define MCF_SCM_CWCR_CWTA                (0x04)\r
61 #define MCF_SCM_CWCR_CWT(x)              (((x)&0x07)<<3)\r
62 #define MCF_SCM_CWCR_CWRI                (0x40)\r
63 #define MCF_SCM_CWCR_CWE                 (0x80)\r
64 \r
65 /* Bit definitions and macros for MCF_SCM_LPICR */\r
66 #define MCF_SCM_LPICR_XLPM_IPL(x)        (((x)&0x07)<<4)\r
67 #define MCF_SCM_LPICR_ENBSTOP            (0x80)\r
68 \r
69 /* Bit definitions and macros for MCF_SCM_DMAREQC */\r
70 #define MCF_SCM_DMAREQC_DMAC0(x)         (((x)&0x0000000F)<<0)\r
71 #define MCF_SCM_DMAREQC_DMAC1(x)         (((x)&0x0000000F)<<4)\r
72 #define MCF_SCM_DMAREQC_DMAC2(x)         (((x)&0x0000000F)<<8)\r
73 #define MCF_SCM_DMAREQC_DMAC3(x)         (((x)&0x0000000F)<<12)\r
74 \r
75 /* Bit definitions and macros for MCF_SCM_MPARK */\r
76 #define MCF_SCM_MPARK_LCKOUT_TIME(x)     (((x)&0x0000000F)<<8)\r
77 #define MCF_SCM_MPARK_PRKLAST            (0x00001000)\r
78 #define MCF_SCM_MPARK_TIMEOUT            (0x00002000)\r
79 #define MCF_SCM_MPARK_FIXED              (0x00004000)\r
80 #define MCF_SCM_MPARK_M1_PRTY(x)         (((x)&0x00000003)<<16)\r
81 #define MCF_SCM_MPARK_M0_PRTY(x)         (((x)&0x00000003)<<18)\r
82 #define MCF_SCM_MPARK_M2_PRTY(x)         (((x)&0x00000003)<<20)\r
83 #define MCF_SCM_MPARK_M3_PRTY(x)         (((x)&0x00000003)<<22)\r
84 #define MCF_SCM_MPARK_BCR24BIT           (0x01000000)\r
85 #define MCF_SCM_MPARK_M2_P_EN            (0x02000000)\r
86 \r
87 /* Bit definitions and macros for MCF_SCM_MPR */\r
88 #define MCF_SCM_MPR_MPR(x)               (((x)&0x0F)<<0)\r
89 \r
90 /* Bit definitions and macros for MCF_SCM_PACR0 */\r
91 #define MCF_SCM_PACR0_ACCESS_CTRL0(x)    (((x)&0x07)<<0)\r
92 #define MCF_SCM_PACR0_LOCK0              (0x08)\r
93 #define MCF_SCM_PACR0_ACCESS_CTRL1(x)    (((x)&0x07)<<4)\r
94 #define MCF_SCM_PACR0_LOCK1              (0x80)\r
95 \r
96 /* Bit definitions and macros for MCF_SCM_PACR1 */\r
97 #define MCF_SCM_PACR1_ACCESS_CTRL0(x)    (((x)&0x07)<<0)\r
98 #define MCF_SCM_PACR1_LOCK0              (0x08)\r
99 #define MCF_SCM_PACR1_ACCESS_CTRL1(x)    (((x)&0x07)<<4)\r
100 #define MCF_SCM_PACR1_LOCK1              (0x80)\r
101 \r
102 /* Bit definitions and macros for MCF_SCM_PACR2 */\r
103 #define MCF_SCM_PACR2_ACCESS_CTRL0(x)    (((x)&0x07)<<0)\r
104 #define MCF_SCM_PACR2_LOCK0              (0x08)\r
105 #define MCF_SCM_PACR2_ACCESS_CTRL1(x)    (((x)&0x07)<<4)\r
106 #define MCF_SCM_PACR2_LOCK1              (0x80)\r
107 \r
108 /* Bit definitions and macros for MCF_SCM_PACR3 */\r
109 #define MCF_SCM_PACR3_ACCESS_CTRL0(x)    (((x)&0x07)<<0)\r
110 #define MCF_SCM_PACR3_LOCK0              (0x08)\r
111 #define MCF_SCM_PACR3_ACCESS_CTRL1(x)    (((x)&0x07)<<4)\r
112 #define MCF_SCM_PACR3_LOCK1              (0x80)\r
113 \r
114 /* Bit definitions and macros for MCF_SCM_PACR4 */\r
115 #define MCF_SCM_PACR4_ACCESS_CTRL0(x)    (((x)&0x07)<<0)\r
116 #define MCF_SCM_PACR4_LOCK0              (0x08)\r
117 #define MCF_SCM_PACR4_ACCESS_CTRL1(x)    (((x)&0x07)<<4)\r
118 #define MCF_SCM_PACR4_LOCK1              (0x80)\r
119 \r
120 /* Bit definitions and macros for MCF_SCM_PACR5 */\r
121 #define MCF_SCM_PACR5_ACCESS_CTRL0(x)    (((x)&0x07)<<0)\r
122 #define MCF_SCM_PACR5_LOCK0              (0x08)\r
123 #define MCF_SCM_PACR5_ACCESS_CTRL1(x)    (((x)&0x07)<<4)\r
124 #define MCF_SCM_PACR5_LOCK1              (0x80)\r
125 \r
126 /* Bit definitions and macros for MCF_SCM_PACR6 */\r
127 #define MCF_SCM_PACR6_ACCESS_CTRL0(x)    (((x)&0x07)<<0)\r
128 #define MCF_SCM_PACR6_LOCK0              (0x08)\r
129 #define MCF_SCM_PACR6_ACCESS_CTRL1(x)    (((x)&0x07)<<4)\r
130 #define MCF_SCM_PACR6_LOCK1              (0x80)\r
131 \r
132 /* Bit definitions and macros for MCF_SCM_PACR7 */\r
133 #define MCF_SCM_PACR7_ACCESS_CTRL0(x)    (((x)&0x07)<<0)\r
134 #define MCF_SCM_PACR7_LOCK0              (0x08)\r
135 #define MCF_SCM_PACR7_ACCESS_CTRL1(x)    (((x)&0x07)<<4)\r
136 #define MCF_SCM_PACR7_LOCK1              (0x80)\r
137 \r
138 /* Bit definitions and macros for MCF_SCM_PACR8 */\r
139 #define MCF_SCM_PACR8_ACCESS_CTRL0(x)    (((x)&0x07)<<0)\r
140 #define MCF_SCM_PACR8_LOCK0              (0x08)\r
141 #define MCF_SCM_PACR8_ACCESS_CTRL1(x)    (((x)&0x07)<<4)\r
142 #define MCF_SCM_PACR8_LOCK1              (0x80)\r
143 \r
144 /* Bit definitions and macros for MCF_SCM_GPACR0 */\r
145 #define MCF_SCM_GPACR0_ACCESS_CTRL(x)    (((x)&0x0F)<<0)\r
146 #define MCF_SCM_GPACR0_LOCK              (0x80)\r
147 \r
148 /********************************************************************/\r
149 \r
150 #endif /* __MCF523X_SCM_H__ */\r