1 |
578 |
jeremybenn |
/* Coldfire C Header File
|
2 |
|
|
* Copyright Freescale Semiconductor Inc
|
3 |
|
|
* All rights reserved.
|
4 |
|
|
*
|
5 |
|
|
* 2007/03/19 Revision: 0.91
|
6 |
|
|
*/
|
7 |
|
|
|
8 |
|
|
#ifndef __MCF52235_CFM_H__
|
9 |
|
|
#define __MCF52235_CFM_H__
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
/*********************************************************************
|
13 |
|
|
*
|
14 |
|
|
* ColdFire Flash Module (CFM)
|
15 |
|
|
*
|
16 |
|
|
*********************************************************************/
|
17 |
|
|
|
18 |
|
|
/* Register read/write macros */
|
19 |
|
|
#define MCF_CFM_CFMMCR (*(vuint16*)(&__IPSBAR[0x1D0000]))
|
20 |
|
|
#define MCF_CFM_CFMCLKD (*(vuint8 *)(&__IPSBAR[0x1D0002]))
|
21 |
|
|
#define MCF_CFM_CFMSEC (*(vuint32*)(&__IPSBAR[0x1D0008]))
|
22 |
|
|
#define MCF_CFM_CFMPROT (*(vuint32*)(&__IPSBAR[0x1D0010]))
|
23 |
|
|
#define MCF_CFM_CFMSACC (*(vuint32*)(&__IPSBAR[0x1D0014]))
|
24 |
|
|
#define MCF_CFM_CFMDACC (*(vuint32*)(&__IPSBAR[0x1D0018]))
|
25 |
|
|
#define MCF_CFM_CFMUSTAT (*(vuint8 *)(&__IPSBAR[0x1D0020]))
|
26 |
|
|
#define MCF_CFM_CFMCMD (*(vuint8 *)(&__IPSBAR[0x1D0024]))
|
27 |
|
|
#define MCF_CFM_CFMCLKSEL (*(vuint16*)(&__IPSBAR[0x1D004A]))
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
/* Bit definitions and macros for MCF_CFM_CFMMCR */
|
31 |
|
|
#define MCF_CFM_CFMMCR_KEYACC (0x20)
|
32 |
|
|
#define MCF_CFM_CFMMCR_CCIE (0x40)
|
33 |
|
|
#define MCF_CFM_CFMMCR_CBEIE (0x80)
|
34 |
|
|
#define MCF_CFM_CFMMCR_AEIE (0x100)
|
35 |
|
|
#define MCF_CFM_CFMMCR_PVIE (0x200)
|
36 |
|
|
#define MCF_CFM_CFMMCR_LOCK (0x400)
|
37 |
|
|
|
38 |
|
|
/* Bit definitions and macros for MCF_CFM_CFMCLKD */
|
39 |
|
|
#define MCF_CFM_CFMCLKD_DIV(x) (((x)&0x3F)<<0)
|
40 |
|
|
#define MCF_CFM_CFMCLKD_PRDIV8 (0x40)
|
41 |
|
|
#define MCF_CFM_CFMCLKD_DIVLD (0x80)
|
42 |
|
|
|
43 |
|
|
/* Bit definitions and macros for MCF_CFM_CFMSEC */
|
44 |
|
|
#define MCF_CFM_CFMSEC_SEC(x) (((x)&0xFFFF)<<0)
|
45 |
|
|
#define MCF_CFM_CFMSEC_SECSTAT (0x40000000)
|
46 |
|
|
#define MCF_CFM_CFMSEC_KEYEN (0x80000000)
|
47 |
|
|
|
48 |
|
|
/* Bit definitions and macros for MCF_CFM_CFMPROT */
|
49 |
|
|
#define MCF_CFM_CFMPROT_PROTECT(x) (((x)&0xFFFFFFFF)<<0)
|
50 |
|
|
|
51 |
|
|
/* Bit definitions and macros for MCF_CFM_CFMSACC */
|
52 |
|
|
#define MCF_CFM_CFMSACC_SUPV(x) (((x)&0xFFFFFFFF)<<0)
|
53 |
|
|
|
54 |
|
|
/* Bit definitions and macros for MCF_CFM_CFMDACC */
|
55 |
|
|
#define MCF_CFM_CFMDACC_DACC(x) (((x)&0xFFFFFFFF)<<0)
|
56 |
|
|
|
57 |
|
|
/* Bit definitions and macros for MCF_CFM_CFMUSTAT */
|
58 |
|
|
#define MCF_CFM_CFMUSTAT_BLANK (0x4)
|
59 |
|
|
#define MCF_CFM_CFMUSTAT_ACCERR (0x10)
|
60 |
|
|
#define MCF_CFM_CFMUSTAT_PVIOL (0x20)
|
61 |
|
|
#define MCF_CFM_CFMUSTAT_CCIF (0x40)
|
62 |
|
|
#define MCF_CFM_CFMUSTAT_CBEIF (0x80)
|
63 |
|
|
|
64 |
|
|
/* Bit definitions and macros for MCF_CFM_CFMCMD */
|
65 |
|
|
#define MCF_CFM_CFMCMD_CMD(x) (((x)&0x7F)<<0)
|
66 |
|
|
#define MCF_CFM_CFMCMD_BLANK_CHECK (0x5)
|
67 |
|
|
#define MCF_CFM_CFMCMD_PAGE_ERASE_VERIFY (0x6)
|
68 |
|
|
#define MCF_CFM_CFMCMD_WORD_PROGRAM (0x20)
|
69 |
|
|
#define MCF_CFM_CFMCMD_PAGE_ERASE (0x40)
|
70 |
|
|
#define MCF_CFM_CFMCMD_MASS_ERASE (0x41)
|
71 |
|
|
|
72 |
|
|
/* Bit definitions and macros for MCF_CFM_CFMCLKSEL */
|
73 |
|
|
#define MCF_CFM_CFMCLKSEL_CLKSEL(x) (((x)&0x3)<<0)
|
74 |
|
|
|
75 |
|
|
|
76 |
|
|
#endif /* __MCF52235_CFM_H__ */
|