1 /******************************************************************************
2 *  Filename:       hw_aux_smph_h
3 *  Revised:        2018-05-14 12:24:52 +0200 (Mon, 14 May 2018)
4 *  Revision:       51990
5 *
6 * Copyright (c) 2015 - 2017, Texas Instruments Incorporated
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 conditions are met:
11 *
12 * 1) Redistributions of source code must retain the above copyright notice,
13 *    this list of conditions and the following disclaimer.
14 *
15 * 2) Redistributions in binary form must reproduce the above copyright notice,
16 *    this list of conditions and the following disclaimer in the documentation
17 *    and/or other materials provided with the distribution.
18 *
19 * 3) Neither the name of the ORGANIZATION nor the names of its contributors may
20 *    be used to endorse or promote products derived from this software without
21 *    specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
34 *
35 ******************************************************************************/
36 
37 #ifndef __HW_AUX_SMPH_H__
38 #define __HW_AUX_SMPH_H__
39 
40 //*****************************************************************************
41 //
42 // This section defines the register offsets of
43 // AUX_SMPH component
44 //
45 //*****************************************************************************
46 // Semaphore 0
47 #define AUX_SMPH_O_SMPH0                                            0x00000000
48 
49 // Semaphore 1
50 #define AUX_SMPH_O_SMPH1                                            0x00000004
51 
52 // Semaphore 2
53 #define AUX_SMPH_O_SMPH2                                            0x00000008
54 
55 // Semaphore 3
56 #define AUX_SMPH_O_SMPH3                                            0x0000000C
57 
58 // Semaphore 4
59 #define AUX_SMPH_O_SMPH4                                            0x00000010
60 
61 // Semaphore 5
62 #define AUX_SMPH_O_SMPH5                                            0x00000014
63 
64 // Semaphore 6
65 #define AUX_SMPH_O_SMPH6                                            0x00000018
66 
67 // Semaphore 7
68 #define AUX_SMPH_O_SMPH7                                            0x0000001C
69 
70 // Auto Take
71 #define AUX_SMPH_O_AUTOTAKE                                         0x00000020
72 
73 //*****************************************************************************
74 //
75 // Register: AUX_SMPH_O_SMPH0
76 //
77 //*****************************************************************************
78 // Field:     [0] STAT
79 //
80 // Request or release of semaphore.
81 //
82 // Request by read:
83 //
84 // 0: Semaphore not available.
85 // 1: Semaphore granted.
86 //
87 // Release by write:
88 //
89 // 0: Do not use.
90 // 1: Release semaphore.
91 #define AUX_SMPH_SMPH0_STAT                                         0x00000001
92 #define AUX_SMPH_SMPH0_STAT_BITN                                             0
93 #define AUX_SMPH_SMPH0_STAT_M                                       0x00000001
94 #define AUX_SMPH_SMPH0_STAT_S                                                0
95 
96 //*****************************************************************************
97 //
98 // Register: AUX_SMPH_O_SMPH1
99 //
100 //*****************************************************************************
101 // Field:     [0] STAT
102 //
103 // Request or release of semaphore.
104 //
105 // Request by read:
106 //
107 // 0: Semaphore not available.
108 // 1: Semaphore granted.
109 //
110 // Release by write:
111 //
112 // 0: Do not use.
113 // 1: Release semaphore.
114 #define AUX_SMPH_SMPH1_STAT                                         0x00000001
115 #define AUX_SMPH_SMPH1_STAT_BITN                                             0
116 #define AUX_SMPH_SMPH1_STAT_M                                       0x00000001
117 #define AUX_SMPH_SMPH1_STAT_S                                                0
118 
119 //*****************************************************************************
120 //
121 // Register: AUX_SMPH_O_SMPH2
122 //
123 //*****************************************************************************
124 // Field:     [0] STAT
125 //
126 // Request or release of semaphore.
127 //
128 // Request by read:
129 //
130 // 0: Semaphore not available.
131 // 1: Semaphore granted.
132 //
133 // Release by write:
134 //
135 // 0: Do not use.
136 // 1: Release semaphore.
137 #define AUX_SMPH_SMPH2_STAT                                         0x00000001
138 #define AUX_SMPH_SMPH2_STAT_BITN                                             0
139 #define AUX_SMPH_SMPH2_STAT_M                                       0x00000001
140 #define AUX_SMPH_SMPH2_STAT_S                                                0
141 
142 //*****************************************************************************
143 //
144 // Register: AUX_SMPH_O_SMPH3
145 //
146 //*****************************************************************************
147 // Field:     [0] STAT
148 //
149 // Request or release of semaphore.
150 //
151 // Request by read:
152 //
153 // 0: Semaphore not available.
154 // 1: Semaphore granted.
155 //
156 // Release by write:
157 //
158 // 0: Do not use.
159 // 1: Release semaphore.
160 #define AUX_SMPH_SMPH3_STAT                                         0x00000001
161 #define AUX_SMPH_SMPH3_STAT_BITN                                             0
162 #define AUX_SMPH_SMPH3_STAT_M                                       0x00000001
163 #define AUX_SMPH_SMPH3_STAT_S                                                0
164 
165 //*****************************************************************************
166 //
167 // Register: AUX_SMPH_O_SMPH4
168 //
169 //*****************************************************************************
170 // Field:     [0] STAT
171 //
172 // Request or release of semaphore.
173 //
174 // Request by read:
175 //
176 // 0: Semaphore not available.
177 // 1: Semaphore granted.
178 //
179 // Release by write:
180 //
181 // 0: Do not use.
182 // 1: Release semaphore.
183 #define AUX_SMPH_SMPH4_STAT                                         0x00000001
184 #define AUX_SMPH_SMPH4_STAT_BITN                                             0
185 #define AUX_SMPH_SMPH4_STAT_M                                       0x00000001
186 #define AUX_SMPH_SMPH4_STAT_S                                                0
187 
188 //*****************************************************************************
189 //
190 // Register: AUX_SMPH_O_SMPH5
191 //
192 //*****************************************************************************
193 // Field:     [0] STAT
194 //
195 // Request or release of semaphore.
196 //
197 // Request by read:
198 //
199 // 0: Semaphore not available.
200 // 1: Semaphore granted.
201 //
202 // Release by write:
203 //
204 // 0: Do not use.
205 // 1: Release semaphore.
206 #define AUX_SMPH_SMPH5_STAT                                         0x00000001
207 #define AUX_SMPH_SMPH5_STAT_BITN                                             0
208 #define AUX_SMPH_SMPH5_STAT_M                                       0x00000001
209 #define AUX_SMPH_SMPH5_STAT_S                                                0
210 
211 //*****************************************************************************
212 //
213 // Register: AUX_SMPH_O_SMPH6
214 //
215 //*****************************************************************************
216 // Field:     [0] STAT
217 //
218 // Request or release of semaphore.
219 //
220 // Request by read:
221 //
222 // 0: Semaphore not available.
223 // 1: Semaphore granted.
224 //
225 // Release by write:
226 //
227 // 0: Do not use.
228 // 1: Release semaphore.
229 #define AUX_SMPH_SMPH6_STAT                                         0x00000001
230 #define AUX_SMPH_SMPH6_STAT_BITN                                             0
231 #define AUX_SMPH_SMPH6_STAT_M                                       0x00000001
232 #define AUX_SMPH_SMPH6_STAT_S                                                0
233 
234 //*****************************************************************************
235 //
236 // Register: AUX_SMPH_O_SMPH7
237 //
238 //*****************************************************************************
239 // Field:     [0] STAT
240 //
241 // Request or release of semaphore.
242 //
243 // Request by read:
244 //
245 // 0: Semaphore not available.
246 // 1: Semaphore granted.
247 //
248 // Release by write:
249 //
250 // 0: Do not use.
251 // 1: Release semaphore.
252 #define AUX_SMPH_SMPH7_STAT                                         0x00000001
253 #define AUX_SMPH_SMPH7_STAT_BITN                                             0
254 #define AUX_SMPH_SMPH7_STAT_M                                       0x00000001
255 #define AUX_SMPH_SMPH7_STAT_S                                                0
256 
257 //*****************************************************************************
258 //
259 // Register: AUX_SMPH_O_AUTOTAKE
260 //
261 //*****************************************************************************
262 // Field:   [2:0] SMPH_ID
263 //
264 // Write the semaphore ID,0x0-0x7, to SMPH_ID to request this semaphore until
265 // it is granted.
266 //
267 // When semaphore SMPH_ID is granted, event
268 // AUX_EVCTL:EVSTAT3.AUX_SMPH_AUTOTAKE_DONE becomes 1.
269 //
270 // The event becomes 0 when software releases the semaphore or writes a new
271 // value to SMPH_ID.
272 //
273 // To avoid corrupted semaphores:
274 // - Usage of this functionality must be restricted to one CPU core.
275 // - Software must wait until AUX_EVCTL:EVSTAT3.AUX_SMPH_AUTOTAKE_DONE is 1
276 // before it writes a new value to SMPH_ID.
277 #define AUX_SMPH_AUTOTAKE_SMPH_ID_W                                          3
278 #define AUX_SMPH_AUTOTAKE_SMPH_ID_M                                 0x00000007
279 #define AUX_SMPH_AUTOTAKE_SMPH_ID_S                                          0
280 
281 
282 #endif // __AUX_SMPH__
283