]> git.sur5r.net Git - freertos/blob - Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/MCF5223x/MCF52235_SCM.h
Still messing around trying to get the workspace to be distributable.
[freertos] / Demo / ColdFire_MCF52233_Eclipse / RTOSDemo / MCF5223x / MCF52235_SCM.h
1 /* Coldfire C Header File\r
2  * Copyright Freescale Semiconductor Inc\r
3  * All rights reserved.\r
4  *\r
5  * 2007/03/19 Revision: 0.91\r
6  */\r
7 \r
8 #ifndef __MCF52235_SCM_H__\r
9 #define __MCF52235_SCM_H__\r
10 \r
11 \r
12 /*********************************************************************\r
13 *\r
14 * System Control Module (SCM)\r
15 *\r
16 *********************************************************************/\r
17 \r
18 /* Register read/write macros */\r
19 #define MCF_SCM_RAMBAR                       (*(vuint32*)(&__IPSBAR[0x8]))\r
20 #define MCF_SCM_PPMRH                        (*(vuint32*)(&__IPSBAR[0xC]))\r
21 #define MCF_SCM_CRSR                         (*(vuint8 *)(&__IPSBAR[0x10]))\r
22 #define MCF_SCM_CWCR                         (*(vuint8 *)(&__IPSBAR[0x11]))\r
23 #define MCF_SCM_CWSR                         (*(vuint8 *)(&__IPSBAR[0x13]))\r
24 #define MCF_SCM_DMAREQC                      (*(vuint32*)(&__IPSBAR[0x14]))\r
25 #define MCF_SCM_PPMRL                        (*(vuint32*)(&__IPSBAR[0x18]))\r
26 #define MCF_SCM_MPARK                        (*(vuint32*)(&__IPSBAR[0x1C]))\r
27 #define MCF_SCM_MPR                          (*(vuint8 *)(&__IPSBAR[0x20]))\r
28 #define MCF_SCM_PPMRS                        (*(vuint8 *)(&__IPSBAR[0x21]))\r
29 #define MCF_SCM_PPMRC                        (*(vuint8 *)(&__IPSBAR[0x22]))\r
30 #define MCF_SCM_IPSBMT                       (*(vuint8 *)(&__IPSBAR[0x23]))\r
31 #define MCF_SCM_PACR0                        (*(vuint8 *)(&__IPSBAR[0x24]))\r
32 #define MCF_SCM_PACR1                        (*(vuint8 *)(&__IPSBAR[0x25]))\r
33 #define MCF_SCM_PACR2                        (*(vuint8 *)(&__IPSBAR[0x26]))\r
34 #define MCF_SCM_PACR3                        (*(vuint8 *)(&__IPSBAR[0x27]))\r
35 #define MCF_SCM_PACR4                        (*(vuint8 *)(&__IPSBAR[0x28]))\r
36 #define MCF_SCM_PACR5                        (*(vuint8 *)(&__IPSBAR[0x29]))\r
37 #define MCF_SCM_PACR6                        (*(vuint8 *)(&__IPSBAR[0x2A]))\r
38 #define MCF_SCM_PACR7                        (*(vuint8 *)(&__IPSBAR[0x2B]))\r
39 #define MCF_SCM_PACR8                        (*(vuint8 *)(&__IPSBAR[0x2C]))\r
40 #define MCF_SCM_GPACR0                       (*(vuint8 *)(&__IPSBAR[0x30]))\r
41 #define MCF_SCM_GPACR1                       (*(vuint8 *)(&__IPSBAR[0x31]))\r
42 #define MCF_SCM_PACR(x)                      (*(vuint8 *)(&__IPSBAR[0x24 + ((x)*0x1)]))\r
43 #define MCF_SCM_GPACR(x)                     (*(vuint8 *)(&__IPSBAR[0x30 + ((x)*0x1)]))\r
44 \r
45 /* Other macros */\r
46 #define MCF_SCM_IPSBAR                       (*(vuint32*)(&__IPSBAR[0x0]))\r
47 #define MCF_SCM_IPSBAR_V                     (0x1)\r
48 #define MCF_SCM_IPSBAR_BA(x)                 ((x)&0xC0000000)\r
49 \r
50 \r
51 /* Bit definitions and macros for MCF_SCM_RAMBAR */\r
52 #define MCF_SCM_RAMBAR_BDE                   (0x200)\r
53 #define MCF_SCM_RAMBAR_BA(x)                 ((x)&0xFFFF0000)\r
54 \r
55 /* Bit definitions and macros for MCF_SCM_PPMRH */\r
56 #define MCF_SCM_PPMRH_CDPORTS                (0x1)\r
57 #define MCF_SCM_PPMRH_CDEPORT                (0x2)\r
58 #define MCF_SCM_PPMRH_CDPIT0                 (0x8)\r
59 #define MCF_SCM_PPMRH_CDPIT1                 (0x10)\r
60 #define MCF_SCM_PPMRH_CDADC                  (0x80)\r
61 #define MCF_SCM_PPMRH_CDGPT                  (0x100)\r
62 #define MCF_SCM_PPMRH_CDPWM                  (0x200)\r
63 #define MCF_SCM_PPMRH_CDFCAN                 (0x400)\r
64 #define MCF_SCM_PPMRH_CDCFM                  (0x800)\r
65 #define MCF_SCM_PPMRH_CDEPHY                 (0x1000)\r
66 #define MCF_SCM_PPMRH_CDRNGA                 (0x2000)\r
67 \r
68 /* Bit definitions and macros for MCF_SCM_CRSR */\r
69 #define MCF_SCM_CRSR_CWDR                    (0x20)\r
70 #define MCF_SCM_CRSR_EXT                     (0x80)\r
71 \r
72 /* Bit definitions and macros for MCF_SCM_CWCR */\r
73 #define MCF_SCM_CWCR_CWTIF                   (0x1)\r
74 #define MCF_SCM_CWCR_CWTAVAL                 (0x2)\r
75 #define MCF_SCM_CWCR_CWTA                    (0x4)\r
76 #define MCF_SCM_CWCR_CWT(x)                  (((x)&0x7)<<0x3)\r
77 #define MCF_SCM_CWCR_CWT_2_9                 (0)\r
78 #define MCF_SCM_CWCR_CWT_2_11                (0x8)\r
79 #define MCF_SCM_CWCR_CWT_2_13                (0x10)\r
80 #define MCF_SCM_CWCR_CWT_2_15                (0x18)\r
81 #define MCF_SCM_CWCR_CWT_2_19                (0x20)\r
82 #define MCF_SCM_CWCR_CWT_2_23                (0x28)\r
83 #define MCF_SCM_CWCR_CWT_2_27                (0x30)\r
84 #define MCF_SCM_CWCR_CWT_2_31                (0x38)\r
85 #define MCF_SCM_CWCR_CWRI                    (0x40)\r
86 #define MCF_SCM_CWCR_CWE                     (0x80)\r
87 \r
88 /* Bit definitions and macros for MCF_SCM_CWSR */\r
89 #define MCF_SCM_CWSR_CWSR(x)                 (((x)&0xFF)<<0)\r
90 \r
91 /* Bit definitions and macros for MCF_SCM_DMAREQC */\r
92 #define MCF_SCM_DMAREQC_DMAC0(x)             (((x)&0xF)<<0)\r
93 #define MCF_SCM_DMAREQC_DMAC1(x)             (((x)&0xF)<<0x4)\r
94 #define MCF_SCM_DMAREQC_DMAC2(x)             (((x)&0xF)<<0x8)\r
95 #define MCF_SCM_DMAREQC_DMAC3(x)             (((x)&0xF)<<0xC)\r
96 \r
97 /* Bit definitions and macros for MCF_SCM_PPMRL */\r
98 #define MCF_SCM_PPMRL_CDG                    (0x2)\r
99 #define MCF_SCM_PPMRL_CDDMA                  (0x10)\r
100 #define MCF_SCM_PPMRL_CDUART0                (0x20)\r
101 #define MCF_SCM_PPMRL_CDUART1                (0x40)\r
102 #define MCF_SCM_PPMRL_CDUART2                (0x80)\r
103 #define MCF_SCM_PPMRL_CDI2C                  (0x200)\r
104 #define MCF_SCM_PPMRL_CDQSPI                 (0x400)\r
105 #define MCF_SCM_PPMRL_CDRTC                  (0x1000)\r
106 #define MCF_SCM_PPMRL_CDTMR0                 (0x2000)\r
107 #define MCF_SCM_PPMRL_CDTMR1                 (0x4000)\r
108 #define MCF_SCM_PPMRL_CDTMR2                 (0x8000)\r
109 #define MCF_SCM_PPMRL_CDTMR3                 (0x10000)\r
110 #define MCF_SCM_PPMRL_CDINTC0                (0x20000)\r
111 #define MCF_SCM_PPMRL_CDINTC1                (0x40000)\r
112 #define MCF_SCM_PPMRL_CDFEC0                 (0x200000)\r
113 \r
114 /* Bit definitions and macros for MCF_SCM_MPARK */\r
115 #define MCF_SCM_MPARK_LCKOUT_TIME(x)         (((x)&0xF)<<0x8)\r
116 #define MCF_SCM_MPARK_PRKLAST                (0x1000)\r
117 #define MCF_SCM_MPARK_TIMEOUT                (0x2000)\r
118 #define MCF_SCM_MPARK_FIXED                  (0x4000)\r
119 #define MCF_SCM_MPARK_M1_PRTY(x)             (((x)&0x3)<<0x10)\r
120 #define MCF_SCM_MPARK_M0_PRTY(x)             (((x)&0x3)<<0x12)\r
121 #define MCF_SCM_MPARK_M2_PRTY(x)             (((x)&0x3)<<0x14)\r
122 #define MCF_SCM_MPARK_BCR24BIT               (0x1000000)\r
123 #define MCF_SCM_MPARK_M2_P_EN                (0x2000000)\r
124 \r
125 /* Bit definitions and macros for MCF_SCM_MPR */\r
126 #define MCF_SCM_MPR_MPR(x)                   (((x)&0xF)<<0)\r
127 \r
128 /* Bit definitions and macros for MCF_SCM_PPMRS */\r
129 #define MCF_SCM_PPMRS_PPMRS(x)               (((x)&0x7F)<<0)\r
130 #define MCF_SCM_PPMRS_DISABLE_ALL            (0x40)\r
131 #define MCF_SCM_PPMRS_DISABLE_CFM            (0x2B)\r
132 #define MCF_SCM_PPMRS_DISABLE_CAN            (0x2A)\r
133 #define MCF_SCM_PPMRS_DISABLE_PWM            (0x29)\r
134 #define MCF_SCM_PPMRS_DISABLE_GPT            (0x28)\r
135 #define MCF_SCM_PPMRS_DISABLE_ADC            (0x27)\r
136 #define MCF_SCM_PPMRS_DISABLE_PIT1           (0x24)\r
137 #define MCF_SCM_PPMRS_DISABLE_PIT0           (0x23)\r
138 #define MCF_SCM_PPMRS_DISABLE_EPORT          (0x21)\r
139 #define MCF_SCM_PPMRS_DISABLE_PORTS          (0x20)\r
140 #define MCF_SCM_PPMRS_DISABLE_INTC           (0x11)\r
141 #define MCF_SCM_PPMRS_DISABLE_DTIM3          (0x10)\r
142 #define MCF_SCM_PPMRS_DISABLE_DTIM2          (0xF)\r
143 #define MCF_SCM_PPMRS_DISABLE_DTIM1          (0xE)\r
144 #define MCF_SCM_PPMRS_DISABLE_DTIM0          (0xD)\r
145 #define MCF_SCM_PPMRS_DISABLE_QSPI           (0xA)\r
146 #define MCF_SCM_PPMRS_DISABLE_I2C            (0x9)\r
147 #define MCF_SCM_PPMRS_DISABLE_UART2          (0x7)\r
148 #define MCF_SCM_PPMRS_DISABLE_UART1          (0x6)\r
149 #define MCF_SCM_PPMRS_DISABLE_UART0          (0x5)\r
150 #define MCF_SCM_PPMRS_DISABLE_DMA            (0x4)\r
151 #define MCF_SCM_PPMRS_SET_CDG                (0x1)\r
152 \r
153 /* Bit definitions and macros for MCF_SCM_PPMRC */\r
154 #define MCF_SCM_PPMRC_PPMRC(x)               (((x)&0x7F)<<0)\r
155 #define MCF_SCM_PPMRC_ENABLE_ALL             (0x40)\r
156 #define MCF_SCM_PPMRC_ENABLE_CFM             (0x2B)\r
157 #define MCF_SCM_PPMRC_ENABLE_CAN             (0x2A)\r
158 #define MCF_SCM_PPMRC_ENABLE_PWM             (0x29)\r
159 #define MCF_SCM_PPMRC_ENABLE_GPT             (0x28)\r
160 #define MCF_SCM_PPMRC_ENABLE_ADC             (0x27)\r
161 #define MCF_SCM_PPMRC_ENABLE_PIT1            (0x24)\r
162 #define MCF_SCM_PPMRC_ENABLE_PIT0            (0x23)\r
163 #define MCF_SCM_PPMRC_ENABLE_EPORT           (0x21)\r
164 #define MCF_SCM_PPMRC_ENABLE_PORTS           (0x20)\r
165 #define MCF_SCM_PPMRC_ENABLE_INTC            (0x11)\r
166 #define MCF_SCM_PPMRC_ENABLE_DTIM3           (0x10)\r
167 #define MCF_SCM_PPMRC_ENABLE_DTIM2           (0xF)\r
168 #define MCF_SCM_PPMRC_ENABLE_DTIM1           (0xE)\r
169 #define MCF_SCM_PPMRC_ENABLE_DTIM0           (0xD)\r
170 #define MCF_SCM_PPMRC_ENABLE_QSPI            (0xA)\r
171 #define MCF_SCM_PPMRC_ENABLE_I2C             (0x9)\r
172 #define MCF_SCM_PPMRC_ENABLE_UART2           (0x7)\r
173 #define MCF_SCM_PPMRC_ENABLE_UART1           (0x6)\r
174 #define MCF_SCM_PPMRC_ENABLE_UART0           (0x5)\r
175 #define MCF_SCM_PPMRC_ENABLE_DMA             (0x4)\r
176 #define MCF_SCM_PPMRC_CLEAR_CDG              (0x1)\r
177 \r
178 /* Bit definitions and macros for MCF_SCM_IPSBMT */\r
179 #define MCF_SCM_IPSBMT_BMT(x)                (((x)&0x7)<<0)\r
180 #define MCF_SCM_IPSBMT_BMT_CYCLES_1024       (0)\r
181 #define MCF_SCM_IPSBMT_BMT_CYCLES_512        (0x1)\r
182 #define MCF_SCM_IPSBMT_BMT_CYCLES_256        (0x2)\r
183 #define MCF_SCM_IPSBMT_BMT_CYCLES_128        (0x3)\r
184 #define MCF_SCM_IPSBMT_BMT_CYCLES_64         (0x4)\r
185 #define MCF_SCM_IPSBMT_BMT_CYCLES_32         (0x5)\r
186 #define MCF_SCM_IPSBMT_BMT_CYCLES_16         (0x6)\r
187 #define MCF_SCM_IPSBMT_BMT_CYCLES_8          (0x7)\r
188 #define MCF_SCM_IPSBMT_BME                   (0x8)\r
189 \r
190 /* Bit definitions and macros for MCF_SCM_PACR */\r
191 #define MCF_SCM_PACR_ACCESS_CTRL0(x)         (((x)&0x7)<<0)\r
192 #define MCF_SCM_PACR_LOCK0                   (0x8)\r
193 #define MCF_SCM_PACR_ACCESS_CTRL1(x)         (((x)&0x7)<<0x4)\r
194 #define MCF_SCM_PACR_LOCK1                   (0x80)\r
195 \r
196 /* Bit definitions and macros for MCF_SCM_GPACR */\r
197 #define MCF_SCM_GPACR_ACCESS_CTRL(x)         (((x)&0xF)<<0)\r
198 #define MCF_SCM_GPACR_LOCK                   (0x80)\r
199 \r
200 \r
201 #endif /* __MCF52235_SCM_H__ */\r