RTEMS  5.1
component_icm.h
1 /* ---------------------------------------------------------------------------- */
2 /* Atmel Microcontroller Software Support */
3 /* SAM Software Package License */
4 /* ---------------------------------------------------------------------------- */
5 /* Copyright (c) 2015, Atmel Corporation */
6 /* */
7 /* All rights reserved. */
8 /* */
9 /* Redistribution and use in source and binary forms, with or without */
10 /* modification, are permitted provided that the following condition is met: */
11 /* */
12 /* - Redistributions of source code must retain the above copyright notice, */
13 /* this list of conditions and the disclaimer below. */
14 /* */
15 /* Atmel's name may not be used to endorse or promote products derived from */
16 /* this software without specific prior written permission. */
17 /* */
18 /* DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR */
19 /* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */
20 /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE */
21 /* DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, */
22 /* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT */
23 /* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
24 /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
25 /* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
26 /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */
27 /* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
28 /* ---------------------------------------------------------------------------- */
29 
30 #ifndef _SAME70_ICM_COMPONENT_
31 #define _SAME70_ICM_COMPONENT_
32 
33 /* ============================================================================= */
35 /* ============================================================================= */
38 
39 #if !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__))
40 
41 typedef struct {
42  __IO uint32_t ICM_CFG;
43  __O uint32_t ICM_CTRL;
44  __O uint32_t ICM_SR;
45  __I uint32_t Reserved1[1];
46  __O uint32_t ICM_IER;
47  __O uint32_t ICM_IDR;
48  __I uint32_t ICM_IMR;
49  __I uint32_t ICM_ISR;
50  __I uint32_t ICM_UASR;
51  __I uint32_t Reserved2[3];
52  __IO uint32_t ICM_DSCR;
53  __IO uint32_t ICM_HASH;
54  __O uint32_t ICM_UIHVAL[8];
55 } Icm;
56 #endif /* !(defined(__ASSEMBLY__) || defined(__IAR_SYSTEMS_ASM__)) */
57 /* -------- ICM_CFG : (ICM Offset: 0x00) Configuration Register -------- */
58 #define ICM_CFG_WBDIS (0x1u << 0)
59 #define ICM_CFG_EOMDIS (0x1u << 1)
60 #define ICM_CFG_SLBDIS (0x1u << 2)
61 #define ICM_CFG_BBC_Pos 4
62 #define ICM_CFG_BBC_Msk (0xfu << ICM_CFG_BBC_Pos)
63 #define ICM_CFG_BBC(value) ((ICM_CFG_BBC_Msk & ((value) << ICM_CFG_BBC_Pos)))
64 #define ICM_CFG_ASCD (0x1u << 8)
65 #define ICM_CFG_DUALBUFF (0x1u << 9)
66 #define ICM_CFG_UIHASH (0x1u << 12)
67 #define ICM_CFG_UALGO_Pos 13
68 #define ICM_CFG_UALGO_Msk (0x7u << ICM_CFG_UALGO_Pos)
69 #define ICM_CFG_UALGO(value) ((ICM_CFG_UALGO_Msk & ((value) << ICM_CFG_UALGO_Pos)))
70 #define ICM_CFG_UALGO_SHA1 (0x0u << 13)
71 #define ICM_CFG_UALGO_SHA256 (0x1u << 13)
72 #define ICM_CFG_UALGO_SHA224 (0x4u << 13)
73 #define ICM_CFG_HAPROT_Pos 16
74 #define ICM_CFG_HAPROT_Msk (0x3fu << ICM_CFG_HAPROT_Pos)
75 #define ICM_CFG_HAPROT(value) ((ICM_CFG_HAPROT_Msk & ((value) << ICM_CFG_HAPROT_Pos)))
76 #define ICM_CFG_DAPROT_Pos 24
77 #define ICM_CFG_DAPROT_Msk (0x3fu << ICM_CFG_DAPROT_Pos)
78 #define ICM_CFG_DAPROT(value) ((ICM_CFG_DAPROT_Msk & ((value) << ICM_CFG_DAPROT_Pos)))
79 /* -------- ICM_CTRL : (ICM Offset: 0x04) Control Register -------- */
80 #define ICM_CTRL_ENABLE (0x1u << 0)
81 #define ICM_CTRL_DISABLE (0x1u << 1)
82 #define ICM_CTRL_SWRST (0x1u << 2)
83 #define ICM_CTRL_REHASH_Pos 4
84 #define ICM_CTRL_REHASH_Msk (0xfu << ICM_CTRL_REHASH_Pos)
85 #define ICM_CTRL_REHASH(value) ((ICM_CTRL_REHASH_Msk & ((value) << ICM_CTRL_REHASH_Pos)))
86 #define ICM_CTRL_RMDIS_Pos 8
87 #define ICM_CTRL_RMDIS_Msk (0xfu << ICM_CTRL_RMDIS_Pos)
88 #define ICM_CTRL_RMDIS(value) ((ICM_CTRL_RMDIS_Msk & ((value) << ICM_CTRL_RMDIS_Pos)))
89 #define ICM_CTRL_RMEN_Pos 12
90 #define ICM_CTRL_RMEN_Msk (0xfu << ICM_CTRL_RMEN_Pos)
91 #define ICM_CTRL_RMEN(value) ((ICM_CTRL_RMEN_Msk & ((value) << ICM_CTRL_RMEN_Pos)))
92 /* -------- ICM_SR : (ICM Offset: 0x08) Status Register -------- */
93 #define ICM_SR_ENABLE (0x1u << 0)
94 #define ICM_SR_RAWRMDIS_Pos 8
95 #define ICM_SR_RAWRMDIS_Msk (0xfu << ICM_SR_RAWRMDIS_Pos)
96 #define ICM_SR_RAWRMDIS(value) ((ICM_SR_RAWRMDIS_Msk & ((value) << ICM_SR_RAWRMDIS_Pos)))
97 #define ICM_SR_RMDIS_Pos 12
98 #define ICM_SR_RMDIS_Msk (0xfu << ICM_SR_RMDIS_Pos)
99 #define ICM_SR_RMDIS(value) ((ICM_SR_RMDIS_Msk & ((value) << ICM_SR_RMDIS_Pos)))
100 /* -------- ICM_IER : (ICM Offset: 0x10) Interrupt Enable Register -------- */
101 #define ICM_IER_RHC_Pos 0
102 #define ICM_IER_RHC_Msk (0xfu << ICM_IER_RHC_Pos)
103 #define ICM_IER_RHC(value) ((ICM_IER_RHC_Msk & ((value) << ICM_IER_RHC_Pos)))
104 #define ICM_IER_RDM_Pos 4
105 #define ICM_IER_RDM_Msk (0xfu << ICM_IER_RDM_Pos)
106 #define ICM_IER_RDM(value) ((ICM_IER_RDM_Msk & ((value) << ICM_IER_RDM_Pos)))
107 #define ICM_IER_RBE_Pos 8
108 #define ICM_IER_RBE_Msk (0xfu << ICM_IER_RBE_Pos)
109 #define ICM_IER_RBE(value) ((ICM_IER_RBE_Msk & ((value) << ICM_IER_RBE_Pos)))
110 #define ICM_IER_RWC_Pos 12
111 #define ICM_IER_RWC_Msk (0xfu << ICM_IER_RWC_Pos)
112 #define ICM_IER_RWC(value) ((ICM_IER_RWC_Msk & ((value) << ICM_IER_RWC_Pos)))
113 #define ICM_IER_REC_Pos 16
114 #define ICM_IER_REC_Msk (0xfu << ICM_IER_REC_Pos)
115 #define ICM_IER_REC(value) ((ICM_IER_REC_Msk & ((value) << ICM_IER_REC_Pos)))
116 #define ICM_IER_RSU_Pos 20
117 #define ICM_IER_RSU_Msk (0xfu << ICM_IER_RSU_Pos)
118 #define ICM_IER_RSU(value) ((ICM_IER_RSU_Msk & ((value) << ICM_IER_RSU_Pos)))
119 #define ICM_IER_URAD (0x1u << 24)
120 /* -------- ICM_IDR : (ICM Offset: 0x14) Interrupt Disable Register -------- */
121 #define ICM_IDR_RHC_Pos 0
122 #define ICM_IDR_RHC_Msk (0xfu << ICM_IDR_RHC_Pos)
123 #define ICM_IDR_RHC(value) ((ICM_IDR_RHC_Msk & ((value) << ICM_IDR_RHC_Pos)))
124 #define ICM_IDR_RDM_Pos 4
125 #define ICM_IDR_RDM_Msk (0xfu << ICM_IDR_RDM_Pos)
126 #define ICM_IDR_RDM(value) ((ICM_IDR_RDM_Msk & ((value) << ICM_IDR_RDM_Pos)))
127 #define ICM_IDR_RBE_Pos 8
128 #define ICM_IDR_RBE_Msk (0xfu << ICM_IDR_RBE_Pos)
129 #define ICM_IDR_RBE(value) ((ICM_IDR_RBE_Msk & ((value) << ICM_IDR_RBE_Pos)))
130 #define ICM_IDR_RWC_Pos 12
131 #define ICM_IDR_RWC_Msk (0xfu << ICM_IDR_RWC_Pos)
132 #define ICM_IDR_RWC(value) ((ICM_IDR_RWC_Msk & ((value) << ICM_IDR_RWC_Pos)))
133 #define ICM_IDR_REC_Pos 16
134 #define ICM_IDR_REC_Msk (0xfu << ICM_IDR_REC_Pos)
135 #define ICM_IDR_REC(value) ((ICM_IDR_REC_Msk & ((value) << ICM_IDR_REC_Pos)))
136 #define ICM_IDR_RSU_Pos 20
137 #define ICM_IDR_RSU_Msk (0xfu << ICM_IDR_RSU_Pos)
138 #define ICM_IDR_RSU(value) ((ICM_IDR_RSU_Msk & ((value) << ICM_IDR_RSU_Pos)))
139 #define ICM_IDR_URAD (0x1u << 24)
140 /* -------- ICM_IMR : (ICM Offset: 0x18) Interrupt Mask Register -------- */
141 #define ICM_IMR_RHC_Pos 0
142 #define ICM_IMR_RHC_Msk (0xfu << ICM_IMR_RHC_Pos)
143 #define ICM_IMR_RDM_Pos 4
144 #define ICM_IMR_RDM_Msk (0xfu << ICM_IMR_RDM_Pos)
145 #define ICM_IMR_RBE_Pos 8
146 #define ICM_IMR_RBE_Msk (0xfu << ICM_IMR_RBE_Pos)
147 #define ICM_IMR_RWC_Pos 12
148 #define ICM_IMR_RWC_Msk (0xfu << ICM_IMR_RWC_Pos)
149 #define ICM_IMR_REC_Pos 16
150 #define ICM_IMR_REC_Msk (0xfu << ICM_IMR_REC_Pos)
151 #define ICM_IMR_RSU_Pos 20
152 #define ICM_IMR_RSU_Msk (0xfu << ICM_IMR_RSU_Pos)
153 #define ICM_IMR_URAD (0x1u << 24)
154 /* -------- ICM_ISR : (ICM Offset: 0x1C) Interrupt Status Register -------- */
155 #define ICM_ISR_RHC_Pos 0
156 #define ICM_ISR_RHC_Msk (0xfu << ICM_ISR_RHC_Pos)
157 #define ICM_ISR_RDM_Pos 4
158 #define ICM_ISR_RDM_Msk (0xfu << ICM_ISR_RDM_Pos)
159 #define ICM_ISR_RBE_Pos 8
160 #define ICM_ISR_RBE_Msk (0xfu << ICM_ISR_RBE_Pos)
161 #define ICM_ISR_RWC_Pos 12
162 #define ICM_ISR_RWC_Msk (0xfu << ICM_ISR_RWC_Pos)
163 #define ICM_ISR_REC_Pos 16
164 #define ICM_ISR_REC_Msk (0xfu << ICM_ISR_REC_Pos)
165 #define ICM_ISR_RSU_Pos 20
166 #define ICM_ISR_RSU_Msk (0xfu << ICM_ISR_RSU_Pos)
167 #define ICM_ISR_URAD (0x1u << 24)
168 /* -------- ICM_UASR : (ICM Offset: 0x20) Undefined Access Status Register -------- */
169 #define ICM_UASR_URAT_Pos 0
170 #define ICM_UASR_URAT_Msk (0x7u << ICM_UASR_URAT_Pos)
171 #define ICM_UASR_URAT_UNSPEC_STRUCT_MEMBER (0x0u << 0)
172 #define ICM_UASR_URAT_ICM_CFG_MODIFIED (0x1u << 0)
173 #define ICM_UASR_URAT_ICM_DSCR_MODIFIED (0x2u << 0)
174 #define ICM_UASR_URAT_ICM_HASH_MODIFIED (0x3u << 0)
175 #define ICM_UASR_URAT_READ_ACCESS (0x4u << 0)
176 /* -------- ICM_DSCR : (ICM Offset: 0x30) Region Descriptor Area Start Address Register -------- */
177 #define ICM_DSCR_DASA_Pos 6
178 #define ICM_DSCR_DASA_Msk (0x3ffffffu << ICM_DSCR_DASA_Pos)
179 #define ICM_DSCR_DASA(value) ((ICM_DSCR_DASA_Msk & ((value) << ICM_DSCR_DASA_Pos)))
180 /* -------- ICM_HASH : (ICM Offset: 0x34) Region Hash Area Start Address Register -------- */
181 #define ICM_HASH_HASA_Pos 7
182 #define ICM_HASH_HASA_Msk (0x1ffffffu << ICM_HASH_HASA_Pos)
183 #define ICM_HASH_HASA(value) ((ICM_HASH_HASA_Msk & ((value) << ICM_HASH_HASA_Pos)))
184 /* -------- ICM_UIHVAL[8] : (ICM Offset: 0x38) User Initial Hash Value 0 Register -------- */
185 #define ICM_UIHVAL_VAL_Pos 0
186 #define ICM_UIHVAL_VAL_Msk (0xffffffffu << ICM_UIHVAL_VAL_Pos)
187 #define ICM_UIHVAL_VAL(value) ((ICM_UIHVAL_VAL_Msk & ((value) << ICM_UIHVAL_VAL_Pos)))
188 
192 #endif /* _SAME70_ICM_COMPONENT_ */
__O uint32_t ICM_SR
(Icm Offset: 0x08) Status Register
Definition: component_icm.h:44
#define __IO
Definition: core_cm7.h:287
#define __O
Definition: core_cm7.h:286
__IO uint32_t ICM_HASH
(Icm Offset: 0x34) Region Hash Area Start Address Register
Definition: component_icm.h:53
__I uint32_t ICM_UASR
(Icm Offset: 0x20) Undefined Access Status Register
Definition: component_icm.h:50
__IO uint32_t ICM_CFG
(Icm Offset: 0x00) Configuration Register
Definition: component_icm.h:42
__IO uint32_t ICM_DSCR
(Icm Offset: 0x30) Region Descriptor Area Start Address Register
Definition: component_icm.h:52
__I uint32_t ICM_IMR
(Icm Offset: 0x18) Interrupt Mask Register
Definition: component_icm.h:48
__O uint32_t ICM_IDR
(Icm Offset: 0x14) Interrupt Disable Register
Definition: component_icm.h:47
__O uint32_t ICM_CTRL
(Icm Offset: 0x04) Control Register
Definition: component_icm.h:43
__O uint32_t ICM_IER
(Icm Offset: 0x10) Interrupt Enable Register
Definition: component_icm.h:46
__I uint32_t ICM_ISR
(Icm Offset: 0x1C) Interrupt Status Register
Definition: component_icm.h:49
Icm hardware registers.
Definition: component_icm.h:41
#define __I
Definition: core_cm7.h:284