1 /* Coldfire C Header File
\r
2 * Copyright Freescale Semiconductor Inc
\r
3 * All rights reserved.
\r
5 * 2008/05/23 Revision: 0.95
\r
7 * (c) Copyright UNIS, a.s. 1997-2008
\r
12 * http : www.processorexpert.com
\r
13 * mail : info@processorexpert.com
\r
16 #ifndef __MCF52221_CLOCK_H__
\r
17 #define __MCF52221_CLOCK_H__
\r
20 /*********************************************************************
\r
22 * Clock Module (CLOCK)
\r
24 *********************************************************************/
\r
26 /* Register read/write macros */
\r
27 #define MCF_CLOCK_SYNCR (*(vuint16*)(0x40120000))
\r
28 #define MCF_CLOCK_SYNSR (*(vuint8 *)(0x40120002))
\r
29 #define MCF_CLOCK_ROCR (*(vuint16*)(0x40120004))
\r
30 #define MCF_CLOCK_LPDR (*(vuint8 *)(0x40120007))
\r
31 #define MCF_CLOCK_CCHR (*(vuint8 *)(0x40120008))
\r
32 #define MCF_CLOCK_CCLR (*(vuint8 *)(0x40120009))
\r
33 #define MCF_CLOCK_OCHR (*(vuint8 *)(0x4012000A))
\r
34 #define MCF_CLOCK_OCLR (*(vuint8 *)(0x4012000B))
\r
35 #define MCF_CLOCK_RTCDR (*(vuint32*)(0x4012000C))
\r
38 /* Bit definitions and macros for MCF_CLOCK_SYNCR */
\r
39 #define MCF_CLOCK_SYNCR_PLLEN (0x1)
\r
40 #define MCF_CLOCK_SYNCR_PLLMODE (0x2)
\r
41 #define MCF_CLOCK_SYNCR_CLKSRC (0x4)
\r
42 #define MCF_CLOCK_SYNCR_FWKUP (0x20)
\r
43 #define MCF_CLOCK_SYNCR_DISCLK (0x40)
\r
44 #define MCF_CLOCK_SYNCR_LOCEN (0x80)
\r
45 #define MCF_CLOCK_SYNCR_RFD(x) (((x)&0x7)<<0x8)
\r
46 #define MCF_CLOCK_SYNCR_LOCRE (0x800)
\r
47 #define MCF_CLOCK_SYNCR_MFD(x) (((x)&0x7)<<0xC)
\r
48 #define MCF_CLOCK_SYNCR_LOLRE (0x8000)
\r
50 /* Bit definitions and macros for MCF_CLOCK_SYNSR */
\r
51 #define MCF_CLOCK_SYNSR_LOCS (0x4)
\r
52 #define MCF_CLOCK_SYNSR_LOCK (0x8)
\r
53 #define MCF_CLOCK_SYNSR_LOCKS (0x10)
\r
54 #define MCF_CLOCK_SYNSR_CRYOSC (0x20)
\r
55 #define MCF_CLOCK_SYNSR_OCOSC (0x40)
\r
56 #define MCF_CLOCK_SYNSR_EXTOSC (0x80)
\r
58 /* Bit definitions and macros for MCF_CLOCK_ROCR */
\r
59 #define MCF_CLOCK_ROCR_TRIM(x) (((x)&0x3FF)<<0)
\r
61 /* Bit definitions and macros for MCF_CLOCK_LPDR */
\r
62 #define MCF_CLOCK_LPDR_LPD(x) (((x)&0xF)<<0)
\r
64 /* Bit definitions and macros for MCF_CLOCK_CCHR */
\r
65 #define MCF_CLOCK_CCHR_CCHR(x) (((x)&0x7)<<0)
\r
67 /* Bit definitions and macros for MCF_CLOCK_CCLR */
\r
68 #define MCF_CLOCK_CCLR_OSCSEL (0x1)
\r
70 /* Bit definitions and macros for MCF_CLOCK_OCHR */
\r
71 #define MCF_CLOCK_OCHR_STBY (0x40)
\r
72 #define MCF_CLOCK_OCHR_OCOEN (0x80)
\r
74 /* Bit definitions and macros for MCF_CLOCK_OCLR */
\r
75 #define MCF_CLOCK_OCLR_RANGE (0x10)
\r
76 #define MCF_CLOCK_OCLR_LPEN (0x20)
\r
77 #define MCF_CLOCK_OCLR_REFS (0x40)
\r
78 #define MCF_CLOCK_OCLR_OSCEN (0x80)
\r
80 /* Bit definitions and macros for MCF_CLOCK_RTCDR */
\r
81 #define MCF_CLOCK_RTCDR_RTCDF(x) (((x)&0xFFFFFFFF)<<0)
\r
84 #endif /* __MCF52221_CLOCK_H__ */
\r