1 /******************************************************************************
2 *  Filename:       hw_aux_smph_h
3 *  Revised:        2015-11-12 13:07:02 +0100 (Thu, 12 Nov 2015)
4 *  Revision:       45056
5 *
6 * Copyright (c) 2015, 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 // Sticky Request For Single Semaphore
71 #define AUX_SMPH_O_AUTOTAKE                                         0x00000020
72 
73 //*****************************************************************************
74 //
75 // Register: AUX_SMPH_O_SMPH0
76 //
77 //*****************************************************************************
78 // Field:     [0] STAT
79 //
80 // Status when reading:
81 //
82 // 0: Semaphore was already taken
83 // 1: Semaphore was available and hence taken by this read access
84 //
85 // Reading the register causes it to change value to 0. Releasing the semaphore
86 // is done by writing 1
87 #define AUX_SMPH_SMPH0_STAT                                         0x00000001
88 #define AUX_SMPH_SMPH0_STAT_BITN                                             0
89 #define AUX_SMPH_SMPH0_STAT_M                                       0x00000001
90 #define AUX_SMPH_SMPH0_STAT_S                                                0
91 
92 //*****************************************************************************
93 //
94 // Register: AUX_SMPH_O_SMPH1
95 //
96 //*****************************************************************************
97 // Field:     [0] STAT
98 //
99 // Status when reading:
100 //
101 // 0: Semaphore was already taken
102 // 1: Semaphore was available and hence taken by this read access
103 //
104 // Reading the register causes it to change value to 0. Releasing the semaphore
105 // is done by writing 1
106 #define AUX_SMPH_SMPH1_STAT                                         0x00000001
107 #define AUX_SMPH_SMPH1_STAT_BITN                                             0
108 #define AUX_SMPH_SMPH1_STAT_M                                       0x00000001
109 #define AUX_SMPH_SMPH1_STAT_S                                                0
110 
111 //*****************************************************************************
112 //
113 // Register: AUX_SMPH_O_SMPH2
114 //
115 //*****************************************************************************
116 // Field:     [0] STAT
117 //
118 // Status when reading:
119 //
120 // 0: Semaphore was already taken
121 // 1: Semaphore was available and hence taken by this read access
122 //
123 // Reading the register causes it to change value to 0. Releasing the semaphore
124 // is done by writing 1
125 #define AUX_SMPH_SMPH2_STAT                                         0x00000001
126 #define AUX_SMPH_SMPH2_STAT_BITN                                             0
127 #define AUX_SMPH_SMPH2_STAT_M                                       0x00000001
128 #define AUX_SMPH_SMPH2_STAT_S                                                0
129 
130 //*****************************************************************************
131 //
132 // Register: AUX_SMPH_O_SMPH3
133 //
134 //*****************************************************************************
135 // Field:     [0] STAT
136 //
137 // Status when reading:
138 //
139 // 0: Semaphore was already taken
140 // 1: Semaphore was available and hence taken by this read access
141 //
142 // Reading the register causes it to change value to 0. Releasing the semaphore
143 // is done by writing 1
144 #define AUX_SMPH_SMPH3_STAT                                         0x00000001
145 #define AUX_SMPH_SMPH3_STAT_BITN                                             0
146 #define AUX_SMPH_SMPH3_STAT_M                                       0x00000001
147 #define AUX_SMPH_SMPH3_STAT_S                                                0
148 
149 //*****************************************************************************
150 //
151 // Register: AUX_SMPH_O_SMPH4
152 //
153 //*****************************************************************************
154 // Field:     [0] STAT
155 //
156 // Status when reading:
157 //
158 // 0: Semaphore was already taken
159 // 1: Semaphore was available and hence taken by this read access
160 //
161 // Reading the register causes it to change value to 0. Releasing the semaphore
162 // is done by writing 1
163 #define AUX_SMPH_SMPH4_STAT                                         0x00000001
164 #define AUX_SMPH_SMPH4_STAT_BITN                                             0
165 #define AUX_SMPH_SMPH4_STAT_M                                       0x00000001
166 #define AUX_SMPH_SMPH4_STAT_S                                                0
167 
168 //*****************************************************************************
169 //
170 // Register: AUX_SMPH_O_SMPH5
171 //
172 //*****************************************************************************
173 // Field:     [0] STAT
174 //
175 // Status when reading:
176 //
177 // 0: Semaphore was already taken
178 // 1: Semaphore was available and hence taken by this read access
179 //
180 // Reading the register causes it to change value to 0. Releasing the semaphore
181 // is done by writing 1
182 #define AUX_SMPH_SMPH5_STAT                                         0x00000001
183 #define AUX_SMPH_SMPH5_STAT_BITN                                             0
184 #define AUX_SMPH_SMPH5_STAT_M                                       0x00000001
185 #define AUX_SMPH_SMPH5_STAT_S                                                0
186 
187 //*****************************************************************************
188 //
189 // Register: AUX_SMPH_O_SMPH6
190 //
191 //*****************************************************************************
192 // Field:     [0] STAT
193 //
194 // Status when reading:
195 //
196 // 0: Semaphore was already taken
197 // 1: Semaphore was available and hence taken by this read access
198 //
199 // Reading the register causes it to change value to 0. Releasing the semaphore
200 // is done by writing 1
201 #define AUX_SMPH_SMPH6_STAT                                         0x00000001
202 #define AUX_SMPH_SMPH6_STAT_BITN                                             0
203 #define AUX_SMPH_SMPH6_STAT_M                                       0x00000001
204 #define AUX_SMPH_SMPH6_STAT_S                                                0
205 
206 //*****************************************************************************
207 //
208 // Register: AUX_SMPH_O_SMPH7
209 //
210 //*****************************************************************************
211 // Field:     [0] STAT
212 //
213 // Status when reading:
214 //
215 // 0: Semaphore was already taken
216 // 1: Semaphore was available and hence taken by this read access
217 //
218 // Reading the register causes it to change value to 0. Releasing the semaphore
219 // is done by writing 1
220 #define AUX_SMPH_SMPH7_STAT                                         0x00000001
221 #define AUX_SMPH_SMPH7_STAT_BITN                                             0
222 #define AUX_SMPH_SMPH7_STAT_M                                       0x00000001
223 #define AUX_SMPH_SMPH7_STAT_S                                                0
224 
225 //*****************************************************************************
226 //
227 // Register: AUX_SMPH_O_AUTOTAKE
228 //
229 //*****************************************************************************
230 // Field:   [2:0] SMPH_ID
231 //
232 // Requesting a certain semaphore is done by writing the corresponding
233 // semaphore ID, 0x0-0x7, to SMPH_ID. The request is sticky and once the
234 // semaphore becomes available it will be taken. At the same time,
235 // SMPH_AUTOTAKE_DONE event is asserted. This event is deasserted when SW
236 // releases the semaphore or a new ID is written to SMPH_ID.
237 //
238 // Note: SW must wait until SMPH_AUTOTAKE_DONE event is triggered before
239 // writing a new ID to SMPH_ID . Failing to do so might lead to permanently
240 // lost semaphores as the owners may be unknown
241 #define AUX_SMPH_AUTOTAKE_SMPH_ID_W                                          3
242 #define AUX_SMPH_AUTOTAKE_SMPH_ID_M                                 0x00000007
243 #define AUX_SMPH_AUTOTAKE_SMPH_ID_S                                          0
244 
245 
246 #endif // __AUX_SMPH__
247