1 /* Coldfire C Header File
\r
2 * Copyright Freescale Semiconductor Inc
\r
3 * All rights reserved.
\r
5 * 2007/03/19 Revision: 0.9
\r
8 #ifndef __MCF5282_CFM_H__
\r
9 #define __MCF5282_CFM_H__
\r
12 /*********************************************************************
\r
14 * ColdFire Flash Module (CFM)
\r
16 *********************************************************************/
\r
18 /* Register read/write macros */
\r
19 #define MCF_CFM_CFMMCR (*(vuint16*)(&__IPSBAR[0x1D0000]))
\r
20 #define MCF_CFM_CFMCLKD (*(vuint8 *)(&__IPSBAR[0x1D0002]))
\r
21 #define MCF_CFM_CFMSEC (*(vuint32*)(&__IPSBAR[0x1D0008]))
\r
22 #define MCF_CFM_CFMPROT (*(vuint32*)(&__IPSBAR[0x1D0010]))
\r
23 #define MCF_CFM_CFMSACC (*(vuint32*)(&__IPSBAR[0x1D0014]))
\r
24 #define MCF_CFM_CFMDACC (*(vuint32*)(&__IPSBAR[0x1D0018]))
\r
25 #define MCF_CFM_CFMUSTAT (*(vuint8 *)(&__IPSBAR[0x1D0020]))
\r
26 #define MCF_CFM_CFMCMD (*(vuint8 *)(&__IPSBAR[0x1D0024]))
\r
29 /* Bit definitions and macros for MCF_CFM_CFMMCR */
\r
30 #define MCF_CFM_CFMMCR_KEYACC (0x20)
\r
31 #define MCF_CFM_CFMMCR_CCIE (0x40)
\r
32 #define MCF_CFM_CFMMCR_CBEIE (0x80)
\r
33 #define MCF_CFM_CFMMCR_AEIE (0x100)
\r
34 #define MCF_CFM_CFMMCR_PVIE (0x200)
\r
35 #define MCF_CFM_CFMMCR_LOCK (0x400)
\r
37 /* Bit definitions and macros for MCF_CFM_CFMCLKD */
\r
38 #define MCF_CFM_CFMCLKD_DIV(x) (((x)&0x3F)<<0)
\r
39 #define MCF_CFM_CFMCLKD_PRDIV8 (0x40)
\r
40 #define MCF_CFM_CFMCLKD_DIVLD (0x80)
\r
42 /* Bit definitions and macros for MCF_CFM_CFMSEC */
\r
43 #define MCF_CFM_CFMSEC_SEC(x) (((x)&0xFFFF)<<0)
\r
44 #define MCF_CFM_CFMSEC_SECSTAT (0x40000000)
\r
45 #define MCF_CFM_CFMSEC_KEYEN (0x80000000)
\r
47 /* Bit definitions and macros for MCF_CFM_CFMPROT */
\r
48 #define MCF_CFM_CFMPROT_PROT(x) (((x)&0xFFFFFFFF)<<0)
\r
50 /* Bit definitions and macros for MCF_CFM_CFMSACC */
\r
51 #define MCF_CFM_CFMSACC_SUPV(x) (((x)&0xFFFFFFFF)<<0)
\r
53 /* Bit definitions and macros for MCF_CFM_CFMDACC */
\r
54 #define MCF_CFM_CFMDACC_DATA(x) (((x)&0xFFFFFFFF)<<0)
\r
56 /* Bit definitions and macros for MCF_CFM_CFMUSTAT */
\r
57 #define MCF_CFM_CFMUSTAT_BLANK (0x4)
\r
58 #define MCF_CFM_CFMUSTAT_ACCERR (0x10)
\r
59 #define MCF_CFM_CFMUSTAT_PVIOL (0x20)
\r
60 #define MCF_CFM_CFMUSTAT_CCIF (0x40)
\r
61 #define MCF_CFM_CFMUSTAT_CBEIF (0x80)
\r
63 /* Bit definitions and macros for MCF_CFM_CFMCMD */
\r
64 #define MCF_CFM_CFMCMD_CMD(x) (((x)&0x7F)<<0)
\r
65 #define MCF_CFM_CFMCMD_BLANK_CHECK (0x5)
\r
66 #define MCF_CFM_CFMCMD_PAGE_ERASE_VERIFY (0x6)
\r
67 #define MCF_CFM_CFMCMD_WORD_PROGRAM (0x20)
\r
68 #define MCF_CFM_CFMCMD_PAGE_ERASE (0x40)
\r
69 #define MCF_CFM_CFMCMD_MASS_ERASE (0x41)
\r
72 #endif /* __MCF5282_CFM_H__ */
\r