1 /* Coldfire C Header File
\r
2 * Copyright Freescale Semiconductor Inc
\r
3 * All rights reserved.
\r
5 * 2008/04/17 Revision: 0.2
\r
7 * (c) Copyright UNIS, spol. s r.o. 1997-2008
\r
12 * http : www.processorexpert.com
\r
13 * mail : info@processorexpert.com
\r
16 #ifndef __MCF52259_CLOCK_H__
\r
17 #define __MCF52259_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_RTCCR (*(vuint8 *)(0x40120012))
\r
36 #define MCF_CLOCK_BWCR (*(vuint8 *)(0x40120013))
\r
39 /* Bit definitions and macros for MCF_CLOCK_SYNCR */
\r
40 #define MCF_CLOCK_SYNCR_PLLEN (0x1)
\r
41 #define MCF_CLOCK_SYNCR_PLLMODE (0x2)
\r
42 #define MCF_CLOCK_SYNCR_CLKSRC (0x4)
\r
43 #define MCF_CLOCK_SYNCR_FWKUP (0x20)
\r
44 #define MCF_CLOCK_SYNCR_DISCLK (0x40)
\r
45 #define MCF_CLOCK_SYNCR_LOCEN (0x80)
\r
46 #define MCF_CLOCK_SYNCR_RFD(x) (((x)&0x7)<<0x8)
\r
47 #define MCF_CLOCK_SYNCR_LOCRE (0x800)
\r
48 #define MCF_CLOCK_SYNCR_MFD(x) (((x)&0x7)<<0xC)
\r
49 #define MCF_CLOCK_SYNCR_LOLRE (0x8000)
\r
51 /* Bit definitions and macros for MCF_CLOCK_SYNSR */
\r
52 #define MCF_CLOCK_SYNSR_LOCS (0x4)
\r
53 #define MCF_CLOCK_SYNSR_LOCK (0x8)
\r
54 #define MCF_CLOCK_SYNSR_LOCKS (0x10)
\r
55 #define MCF_CLOCK_SYNSR_CRYOSC (0x20)
\r
56 #define MCF_CLOCK_SYNSR_OCOSC (0x40)
\r
57 #define MCF_CLOCK_SYNSR_EXTOSC (0x80)
\r
59 /* Bit definitions and macros for MCF_CLOCK_ROCR */
\r
60 #define MCF_CLOCK_ROCR_TRIM(x) (((x)&0x3FF)<<0)
\r
62 /* Bit definitions and macros for MCF_CLOCK_LPDR */
\r
63 #define MCF_CLOCK_LPDR_LPD(x) (((x)&0xF)<<0)
\r
65 /* Bit definitions and macros for MCF_CLOCK_CCHR */
\r
66 #define MCF_CLOCK_CCHR_CCHR(x) (((x)&0x7)<<0)
\r
68 /* Bit definitions and macros for MCF_CLOCK_CCLR */
\r
69 #define MCF_CLOCK_CCLR_OSCSEL0 (0x1)
\r
70 #define MCF_CLOCK_CCLR_OSCSEL1 (0x2)
\r
72 /* Bit definitions and macros for MCF_CLOCK_OCHR */
\r
73 #define MCF_CLOCK_OCHR_STBY (0x40)
\r
74 #define MCF_CLOCK_OCHR_OCOEN (0x80)
\r
76 /* Bit definitions and macros for MCF_CLOCK_OCLR */
\r
77 #define MCF_CLOCK_OCLR_RANGE (0x10)
\r
78 #define MCF_CLOCK_OCLR_LPEN (0x20)
\r
79 #define MCF_CLOCK_OCLR_REFS (0x40)
\r
80 #define MCF_CLOCK_OCLR_OSCEN (0x80)
\r
82 /* Bit definitions and macros for MCF_CLOCK_RTCCR */
\r
83 #define MCF_CLOCK_RTCCR_RTCSEL (0x1)
\r
84 #define MCF_CLOCK_RTCCR_LPEN (0x2)
\r
85 #define MCF_CLOCK_RTCCR_REFS (0x4)
\r
86 #define MCF_CLOCK_RTCCR_KHZEN (0x8)
\r
87 #define MCF_CLOCK_RTCCR_OSCEN (0x10)
\r
88 #define MCF_CLOCK_RTCCR_EXTALEN (0x40)
\r
90 /* Bit definitions and macros for MCF_CLOCK_BWCR */
\r
91 #define MCF_CLOCK_BWCR_BWDSEL (0x1)
\r
92 #define MCF_CLOCK_BWCR_BWDSTOP (0x2)
\r
95 #endif /* __MCF52259_CLOCK_H__ */
\r