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