1 2 3 4
5
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
38 /*!
39 * ======== HDVICP2 ========
40 * HDVICP2-specific IRES Resman and Protocol Implementation
41 *
42 */
43 @Template("./HDVICP2.xdt")
44
45 metaonly module HDVICP2 inherits ti.sdo.fc.ires.IRESMAN {
46
47 const Int MAXRESOURCES = 10; /*! Maximum number of HDVICP2 resources
48 this module can manage. */
49 /*!
50 * ======= memoryBaseAddress =======
51 *
52 */
53 config UInt memoryBaseAddress[MAXRESOURCES];
54
55 /*!
56 * ======= resetControlAddress =======
57 *
58 */
59 config UInt resetControlAddress[MAXRESOURCES];
60
61
62 /*!
63 * ======= registerBaseAddress =======
64 * Base-address of the IVA-HD register space
65 *
66 */
67 config UInt registerBaseAddress[MAXRESOURCES];
68
69 /*!
70 * ======= configureFxn =======
71 * Function to configure the interrupt associated with the IVAHD and
72 * register a callback function.
73 *
74 * Function signature of callback is:
75 * @p(code)
76 * Void _cbFunction(Void * cbArgs);
77 *
78 * Function signature of configure is:
79 * @p(code)
80 * XDAS_Void _configure(IALG_Handle algHandle,
81 * IRES_HDVICP2_Obj * hdvicpHandle,
82 * IRES_HDVICP2_CallbackFxn cbFunctionPtr, XDAS_Void * cbArgs);
83 */
84 config String configureFxn;
85
86 /*!
87 * ======= waitFxn =======
88 * Function to wait on the interrupt associated with the IVAHD to fire
89 *
90 * Function signature is:
91 * @p(code)
92 * XDAS_UInt32 _wait(IALG_Handle algHandle,
93 * IRES_HDVICP2_Obj * hdvicpHandle,
94 * IRES_YieldContext * yieldContext);
95 */
96 config String waitFxn;
97
98 /*!
99 * ======= doneFxn =======
100 * Function indicating "done".
101 *
102 * This is the function called from the ISR interrupt associated with
103 * the IVAHD to unblock the {@link #waitFxn}.
104 *
105 * Function signature is:
106 * @p(code)
107 * XDAS_Void _done(IALG_Handle algHandle, IRES_HDVICP2_Obj * hdvicpHandle);
108 */
109 config String doneFxn;
110
111 /*!
112 * ======= resetFxn =======
113 * Function to reset the IVAHD.
114 *
115 * This is a callback function implemented by the framework and called by
116 * the codec.
117 *
118 * Function signature is:
119 * @p(code)
120 * XDAS_UInt32 _reset(IALG_Handle algHandle,
121 * IRES_HDVICP2_Obj * hdvicpHandle);
122 */
123 config String resetFxn;
124
125
126 /*!
127 * ======= clearPRCMRegister =======
128 * Boolean value that indicates whether the PRCM register needs to be
129 * cleared in the default implementation of the "reset" function
130 */
131 config Bool clearPRCMRegister;
132
133 /*!
134 * ======= timeout =======
135 * Timeout value representing "Wait forever" to be used to configure the
136 * {@link #timeout} configuration below.
137 */
138 const UInt FOREVER = -1;
139
140 /*!
141 * ======= timeout =======
142 * Timeout setting in microseconds, used by the "waitFxn" while waiting for * a configured IVAHD's interrupt to fire.
143 */
144 config UInt timeout;
145
146 /*!
147 * ======= delegate =======
148 * Package name that implements the above configure, wait, done, reset
149 * functions for the IVA-HD.
150 */
151 config String delegate;
152
153 /*!
154 * ======== semCreateFxn ========
155 * Function to create semaphores used by the resource manager
156 *
157 * Function signature is:
158 * @p(code)
159 * Void * _semCreate(Int key, Int count);
160 */
161 config String semCreateFxn = null;
162
163 /*!
164 * ======== semDeleteFxn ========
165 * Function to delete semaphores used by the resource manager
166 *
167 * Function signature is:
168 * @p(code)
169 * Void _semDelete(Void * sem);
170 */
171 config String semDeleteFxn = null;
172
173 /*!
174 * ======== semPendFxn ========
175 * Function to pend on semaphores used by the resource manager
176 *
177 * Function signature is:
178 * @p(code)
179 * Int _semPend(Void * sem, unsigned int timeout);
180 */
181 config String semPendFxn = null;
182
183 /*!
184 * ======== semPostFxn ========
185 * Function to post on Semaphores used by the resource manager
186 *
187 * Function signature is:
188 * @p(code)
189 * Void _semPost(Void * sem);
190 */
191 config String semPostFxn = null;
192
193 /*!
194 * ======== ipcKeyBase ========
195 * Base value of keys of Linux IPC objects used by HDVICP2.
196 *
197 * This applies only to Linux-based environments. The IPC objects
198 * created by HDVICP2 will use keys starting at this
199 * value, and incrementing with each new object. There are currently
200 * three IPC objects, so keys in the range of ipcKeyBase to ipcKeyBase + 2
201 * will be reserved for HDVICP. The default value of ipcKeyBase is
202 * ascii code for "2VDH".
203 *
204 * WARNING: This value should only be changed if it conflicts with
205 * another IPC key in the system that cannot be changed. If this value
206 * is changed, all programs using HDVICP that will be run simultaneously
207 * must have the ipcKeyBase configured to the new value.
208 * @_nodoc
209 */
210 config UInt ipcKeyBase = 0x32564448;
211
212
213 override config Bool autoRegister = true;
214
215 216 217 218 219 220 221 222
223
224 config String getHDVICP2Fxn;
225
226 227 228 229 230 231 232 233
234
235 config String freeHDVICP2Fxn;
236
237 /*!
238 * ======== yieldReleaseFxn ========
239 */
240 config String yieldReleaseFxn;
241
242 /*!
243 * ======== yieldAcquireFxn ========
244 */
245 config String yieldAcquireFxn;
246
247 /*!
248 * ======== getYieldArgsFxn ========
249 */
250 config String getYieldArgsFxn;
251
252 /*!
253 * ======== maxHdvicp2ResetDelay ========
254 * Maximum number of cycles to wait for HDVICP2 to reset, after a call is
255 * issued.
256 */
257 config UInt maxHdvicp2ResetDelay = 1000;
258
259 /*!
260 * ======= numHdvicp2 =======
261 * If catalog part does not declare peripheral information, it can be
262 * configured here. Number of IVAHD or HDVICP2s on this part
263 * @_nodoc
264 */
265 config UInt numHdvicp2;
266
267 268 269 270 271 272 273
274 config UInt intArray[8];
275 }
276 277 278 279
280