1 |
583 |
jeremybenn |
/*
|
2 |
|
|
* These files are taken from the MCF523X source code example package
|
3 |
|
|
* which is available on the Freescale website. Freescale explicitly
|
4 |
|
|
* grants the redistribution and modification of these source files.
|
5 |
|
|
* The complete licensing information is available in the file
|
6 |
|
|
* LICENSE_FREESCALE.TXT.
|
7 |
|
|
*
|
8 |
|
|
* File: mcf523x_mdha.h
|
9 |
|
|
* Purpose: Register and bit definitions for the MCF523X
|
10 |
|
|
*
|
11 |
|
|
* Notes:
|
12 |
|
|
*
|
13 |
|
|
*/
|
14 |
|
|
|
15 |
|
|
#ifndef __MCF523X_MDHA_H__
|
16 |
|
|
#define __MCF523X_MDHA_H__
|
17 |
|
|
|
18 |
|
|
/*********************************************************************
|
19 |
|
|
*
|
20 |
|
|
* Message Digest Hardware Accelerator (MDHA)
|
21 |
|
|
*
|
22 |
|
|
*********************************************************************/
|
23 |
|
|
|
24 |
|
|
/* Register read/write macros */
|
25 |
|
|
#define MCF_MDHA_MDMR (*(vuint32*)(void*)(&__IPSBAR[0x190000]))
|
26 |
|
|
#define MCF_MDHA_MDCR (*(vuint32*)(void*)(&__IPSBAR[0x190004]))
|
27 |
|
|
#define MCF_MDHA_MDCMR (*(vuint32*)(void*)(&__IPSBAR[0x190008]))
|
28 |
|
|
#define MCF_MDHA_MDSR (*(vuint32*)(void*)(&__IPSBAR[0x19000C]))
|
29 |
|
|
#define MCF_MDHA_MDISR (*(vuint32*)(void*)(&__IPSBAR[0x190010]))
|
30 |
|
|
#define MCF_MDHA_MDIMR (*(vuint32*)(void*)(&__IPSBAR[0x190014]))
|
31 |
|
|
#define MCF_MDHA_MDDSR (*(vuint32*)(void*)(&__IPSBAR[0x19001C]))
|
32 |
|
|
#define MCF_MDHA_MDIN (*(vuint32*)(void*)(&__IPSBAR[0x190020]))
|
33 |
|
|
#define MCF_MDHA_MDA0 (*(vuint32*)(void*)(&__IPSBAR[0x190030]))
|
34 |
|
|
#define MCF_MDHA_MDB0 (*(vuint32*)(void*)(&__IPSBAR[0x190034]))
|
35 |
|
|
#define MCF_MDHA_MDC0 (*(vuint32*)(void*)(&__IPSBAR[0x190038]))
|
36 |
|
|
#define MCF_MDHA_MDD0 (*(vuint32*)(void*)(&__IPSBAR[0x19003C]))
|
37 |
|
|
#define MCF_MDHA_MDE0 (*(vuint32*)(void*)(&__IPSBAR[0x190040]))
|
38 |
|
|
#define MCF_MDHA_MDMDS (*(vuint32*)(void*)(&__IPSBAR[0x190044]))
|
39 |
|
|
#define MCF_MDHA_MDA1 (*(vuint32*)(void*)(&__IPSBAR[0x190070]))
|
40 |
|
|
#define MCF_MDHA_MDB1 (*(vuint32*)(void*)(&__IPSBAR[0x190074]))
|
41 |
|
|
#define MCF_MDHA_MDC1 (*(vuint32*)(void*)(&__IPSBAR[0x190078]))
|
42 |
|
|
#define MCF_MDHA_MDD1 (*(vuint32*)(void*)(&__IPSBAR[0x19007C]))
|
43 |
|
|
#define MCF_MDHA_MDE1 (*(vuint32*)(void*)(&__IPSBAR[0x190080]))
|
44 |
|
|
|
45 |
|
|
/* Bit definitions and macros for MCF_MDHA_MDMR */
|
46 |
|
|
#define MCF_MDHA_MDMR_ALG (0x00000001)
|
47 |
|
|
#define MCF_MDHA_MDMR_PDATA (0x00000004)
|
48 |
|
|
#define MCF_MDHA_MDMR_MAC(x) (((x)&0x00000003)<<3)
|
49 |
|
|
#define MCF_MDHA_MDMR_INIT (0x00000020)
|
50 |
|
|
#define MCF_MDHA_MDMR_IPAD (0x00000040)
|
51 |
|
|
#define MCF_MDHA_MDMR_OPAD (0x00000080)
|
52 |
|
|
#define MCF_MDHA_MDMR_SWAP (0x00000100)
|
53 |
|
|
#define MCF_MDHA_MDMR_MACFULL (0x00000200)
|
54 |
|
|
#define MCF_MDHA_MDMR_SSL (0x00000400)
|
55 |
|
|
|
56 |
|
|
/* Bit definitions and macros for MCF_MDHA_MDCR */
|
57 |
|
|
#define MCF_MDHA_MDCR_IE (0x00000001)
|
58 |
|
|
|
59 |
|
|
/* Bit definitions and macros for MCF_MDHA_MDCMR */
|
60 |
|
|
#define MCF_MDHA_MDCMR_SWR (0x00000001)
|
61 |
|
|
#define MCF_MDHA_MDCMR_RI (0x00000002)
|
62 |
|
|
#define MCF_MDHA_MDCMR_CI (0x00000004)
|
63 |
|
|
#define MCF_MDHA_MDCMR_GO (0x00000008)
|
64 |
|
|
|
65 |
|
|
/* Bit definitions and macros for MCF_MDHA_MDSR */
|
66 |
|
|
#define MCF_MDHA_MDSR_INT (0x00000001)
|
67 |
|
|
#define MCF_MDHA_MDSR_DONE (0x00000002)
|
68 |
|
|
#define MCF_MDHA_MDSR_ERR (0x00000004)
|
69 |
|
|
#define MCF_MDHA_MDSR_RD (0x00000008)
|
70 |
|
|
#define MCF_MDHA_MDSR_BUSY (0x00000010)
|
71 |
|
|
#define MCF_MDHA_MDSR_END (0x00000020)
|
72 |
|
|
#define MCF_MDHA_MDSR_HSH (0x00000040)
|
73 |
|
|
#define MCF_MDHA_MDSR_GNW (0x00000080)
|
74 |
|
|
#define MCF_MDHA_MDSR_FS(x) (((x)&0x00000007)<<8)
|
75 |
|
|
#define MCF_MDHA_MDSR_APD(x) (((x)&0x00000007)<<13)
|
76 |
|
|
#define MCF_MDHA_MDSR_IFL(x) (((x)&0x000000FF)<<16)
|
77 |
|
|
|
78 |
|
|
/* Bit definitions and macros for MCF_MDHA_MDIR */
|
79 |
|
|
#define MCF_MDHA_MDIR_IFO (0x00000001)
|
80 |
|
|
#define MCF_MDHA_MDIR_NON (0x00000004)
|
81 |
|
|
#define MCF_MDHA_MDIR_IME (0x00000010)
|
82 |
|
|
#define MCF_MDHA_MDIR_IDS (0x00000020)
|
83 |
|
|
#define MCF_MDHA_MDIR_RMDP (0x00000080)
|
84 |
|
|
#define MCF_MDHA_MDIR_ERE (0x00000100)
|
85 |
|
|
#define MCF_MDHA_MDIR_GTDS (0x00000200)
|
86 |
|
|
|
87 |
|
|
/* Bit definitions and macros for MCF_MDHA_MDIMR */
|
88 |
|
|
#define MCF_MDHA_MDIMR_IFO (0x00000001)
|
89 |
|
|
#define MCF_MDHA_MDIMR_NON (0x00000004)
|
90 |
|
|
#define MCF_MDHA_MDIMR_IME (0x00000010)
|
91 |
|
|
#define MCF_MDHA_MDIMR_IDS (0x00000020)
|
92 |
|
|
#define MCF_MDHA_MDIMR_RMDP (0x00000080)
|
93 |
|
|
#define MCF_MDHA_MDIMR_ERE (0x00000100)
|
94 |
|
|
#define MCF_MDHA_MDIMR_GTDS (0x00000200)
|
95 |
|
|
|
96 |
|
|
/* Bit definitions and macros for MCF_MDHA_MDDSR */
|
97 |
|
|
#define MCF_MDHA_MDDSR_DATASIZE(x) (((x)&0x1FFFFFFF)<<0)
|
98 |
|
|
|
99 |
|
|
/********************************************************************/
|
100 |
|
|
|
101 |
|
|
#endif /* __MCF523X_MDHA_H__ */
|