~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/dsp/syslink/procmgr/procmgr_drvdefs.h

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * procmgr_drvdefs.h
3
 
 *
4
 
 * Syslink driver support functions for TI OMAP processors.
5
 
 *
6
 
 * Copyright (C) 2009-2010 Texas Instruments, Inc.
7
 
 *
8
 
 * This package is free software; you can redistribute it and/or modify
9
 
 * it under the terms of the GNU General Public License version 2 as
10
 
 * published by the Free Software Foundation.
11
 
 *
12
 
 * THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13
 
 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14
 
 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15
 
 */
16
 
 
17
 
 
18
 
#ifndef SYSLINK_PROCMGR_DRVDEFS_H
19
 
#define SYSLINK_PROCMGR_DRVDEFS_H
20
 
 
21
 
#include <linux/types.h>
22
 
 
23
 
/* Module headers */
24
 
#include <procmgr.h>
25
 
 
26
 
 
27
 
/* =================================
28
 
 *  Macros and types
29
 
 * =================================
30
 
 */
31
 
/*
32
 
 * Base structure for ProcMgr command args. This needs to be the first
33
 
 *  field in all command args structures.
34
 
 */
35
 
struct proc_mgr_cmd_args {
36
 
        int api_status;
37
 
        /*Status of the API being called. */
38
 
};
39
 
 
40
 
/*  --------------------------------------
41
 
 *  IOCTL command IDs for ProcMgr
42
 
 *  ---------------------------------------
43
 
 */
44
 
/*
45
 
 * Base command ID for ProcMgr
46
 
 */
47
 
#define PROCMGR_BASE_CMD                        0x100
48
 
 
49
 
/*
50
 
 * Command for ProcMgr_getConfig
51
 
 */
52
 
#define CMD_PROCMGR_GETCONFIG           (PROCMGR_BASE_CMD + 1)
53
 
 
54
 
/*
55
 
 * Command for ProcMgr_setup
56
 
 */
57
 
#define CMD_PROCMGR_SETUP                       (PROCMGR_BASE_CMD + 2)
58
 
 
59
 
/*
60
 
 * Command for ProcMgr_setup
61
 
 */
62
 
#define CMD_PROCMGR_DESTROY                     (PROCMGR_BASE_CMD + 3)
63
 
 
64
 
/*
65
 
 * Command for ProcMgr_destroy
66
 
 */
67
 
#define CMD_PROCMGR_PARAMS_INIT         (PROCMGR_BASE_CMD + 4)
68
 
 
69
 
/*
70
 
 * Command for ProcMgr_create
71
 
 */
72
 
#define CMD_PROCMGR_CREATE                      (PROCMGR_BASE_CMD + 5)
73
 
 
74
 
/*
75
 
 * Command for ProcMgr_delete
76
 
 */
77
 
#define CMD_PROCMGR_DELETE                      (PROCMGR_BASE_CMD + 6)
78
 
 
79
 
/*
80
 
 * Command for ProcMgr_open
81
 
 */
82
 
#define CMD_PROCMGR_OPEN                        (PROCMGR_BASE_CMD + 7)
83
 
 
84
 
/*
85
 
 * Command for ProcMgr_close
86
 
 */
87
 
#define CMD_PROCMGR_CLOSE                       (PROCMGR_BASE_CMD + 8)
88
 
 
89
 
/*
90
 
 * Command for ProcMgr_getAttachParams
91
 
 */
92
 
#define CMD_PROCMGR_GETATTACHPARAMS             (PROCMGR_BASE_CMD + 9)
93
 
 
94
 
/*
95
 
 * Command for ProcMgr_attach
96
 
 */
97
 
#define CMD_PROCMGR_ATTACH                      (PROCMGR_BASE_CMD + 10)
98
 
 
99
 
/*
100
 
 * Command for ProcMgr_detach
101
 
 */
102
 
#define CMD_PROCMGR_DETACH                      (PROCMGR_BASE_CMD + 11)
103
 
 
104
 
/*
105
 
 * Command for ProcMgr_load
106
 
 */
107
 
#define CMD_PROCMGR_LOAD                        (PROCMGR_BASE_CMD + 12)
108
 
 
109
 
/*
110
 
 * Command for ProcMgr_unload
111
 
 */
112
 
#define CMD_PROCMGR_UNLOAD                      (PROCMGR_BASE_CMD + 13)
113
 
 
114
 
/*
115
 
 * Command for ProcMgr_getStartParams
116
 
 */
117
 
#define CMD_PROCMGR_GETSTARTPARAMS              (PROCMGR_BASE_CMD + 14)
118
 
 
119
 
/*
120
 
 * Command for ProcMgr_start
121
 
 */
122
 
#define CMD_PROCMGR_START                       (PROCMGR_BASE_CMD + 15)
123
 
 
124
 
/*
125
 
 * Command for ProcMgr_stop
126
 
 */
127
 
#define CMD_PROCMGR_STOP                        (PROCMGR_BASE_CMD + 16)
128
 
 
129
 
/*
130
 
 * Command for ProcMgr_getState
131
 
 */
132
 
#define CMD_PROCMGR_GETSTATE                    (PROCMGR_BASE_CMD + 17)
133
 
 
134
 
/*
135
 
 * Command for ProcMgr_read
136
 
 */
137
 
#define CMD_PROCMGR_READ                        (PROCMGR_BASE_CMD + 18)
138
 
 
139
 
/*
140
 
 * Command for ProcMgr_write
141
 
 */
142
 
#define CMD_PROCMGR_WRITE                       (PROCMGR_BASE_CMD + 19)
143
 
 
144
 
/*
145
 
 * Command for ProcMgr_control
146
 
 */
147
 
#define CMD_PROCMGR_CONTROL                     (PROCMGR_BASE_CMD + 20)
148
 
 
149
 
/*
150
 
 * Command for ProcMgr_translateAddr
151
 
 */
152
 
#define CMD_PROCMGR_TRANSLATEADDR               (PROCMGR_BASE_CMD + 22)
153
 
 
154
 
/*
155
 
 * Command for ProcMgr_getSymbolAddress
156
 
 */
157
 
#define CMD_PROCMGR_GETSYMBOLADDRESS            (PROCMGR_BASE_CMD + 23)
158
 
 
159
 
/*
160
 
 * Command for ProcMgr_map
161
 
 */
162
 
#define CMD_PROCMGR_MAP                         (PROCMGR_BASE_CMD + 24)
163
 
 
164
 
/*
165
 
 * Command for ProcMgr_registerNotify
166
 
 */
167
 
#define CMD_PROCMGR_REGISTERNOTIFY              (PROCMGR_BASE_CMD + 25)
168
 
 
169
 
/*
170
 
 * Command for ProcMgr_getProcInfo
171
 
 */
172
 
#define CMD_PROCMGR_GETPROCINFO                 (PROCMGR_BASE_CMD + 26)
173
 
 
174
 
/*
175
 
 * Command for ProcMgr_unmap
176
 
 */
177
 
#define CMD_PROCMGR_UNMAP                       (PROCMGR_BASE_CMD + 27)
178
 
 
179
 
/*
180
 
 * Command for ProcMgr_getVirtToPhysPages
181
 
 */
182
 
#define CMD_PROCMGR_GETVIRTTOPHYS               (PROCMGR_BASE_CMD + 28)
183
 
 
184
 
 
185
 
/*
186
 
 * Command to get Board revision
187
 
 */
188
 
#define CMD_PROCMGR_GETBOARDREV                 (PROCMGR_BASE_CMD + 31)
189
 
 
190
 
 
191
 
 
192
 
/*  ----------------------------------------------------------------------------
193
 
 *  Command arguments for ProcMgr
194
 
 *  ----------------------------------------------------------------------------
195
 
 */
196
 
/*
197
 
 * Command arguments for ProcMgr_getConfig
198
 
 */
199
 
struct proc_mgr_cmd_args_get_config {
200
 
        struct proc_mgr_cmd_args commond_args;
201
 
        /*Common command args */
202
 
        struct proc_mgr_config *cfg;
203
 
        /*Pointer to the ProcMgr module configuration structure in which the
204
 
         default config is to be returned. */
205
 
};
206
 
 
207
 
/*
208
 
 * Command arguments for ProcMgr_setup
209
 
 */
210
 
struct proc_mgr_cmd_args_setup {
211
 
        struct proc_mgr_cmd_args commond_args;
212
 
        /*Common command args */
213
 
        struct proc_mgr_config *cfg;
214
 
        /*Optional ProcMgr module configuration. If provided as NULL, default
215
 
         configuration is used. */
216
 
};
217
 
 
218
 
/*
219
 
 * Command arguments for ProcMgr_destroy
220
 
 */
221
 
struct proc_mgr_cmd_args_destroy {
222
 
        struct proc_mgr_cmd_args commond_args;
223
 
        /*Common command args */
224
 
};
225
 
 
226
 
/*
227
 
 * Command arguments for ProcMgr_Params_init
228
 
 */
229
 
struct proc_mgr_cmd_args_params_init {
230
 
        struct proc_mgr_cmd_args commond_args;
231
 
        /*Common command args */
232
 
        void *handle;
233
 
        /*Handle to the ProcMgr object. */
234
 
        struct proc_mgr_params *params;
235
 
        /*Pointer to the ProcMgr instance params structure in which the default
236
 
         params is to be returned. */
237
 
};
238
 
 
239
 
/*
240
 
 * Command arguments for ProcMgr_create
241
 
 */
242
 
struct proc_mgr_cmd_args_create {
243
 
        struct proc_mgr_cmd_args commond_args;
244
 
        /*Common command args */
245
 
        u16 proc_id;
246
 
        /*Processor ID represented by this ProcMgr instance */
247
 
        struct proc_mgr_params  params;
248
 
        /*ProcMgr instance configuration parameters. */
249
 
        void *handle;
250
 
        /*Handle to the created ProcMgr object */
251
 
};
252
 
 
253
 
/*
254
 
 * Command arguments for ProcMgr_delete
255
 
 */
256
 
struct proc_mgr_cmd_args_delete{
257
 
        struct proc_mgr_cmd_args commond_args;
258
 
        /*Common command args */
259
 
        void *handle;
260
 
        /*Pointer to Handle to the ProcMgr object */
261
 
};
262
 
 
263
 
/*
264
 
 * Command arguments for ProcMgr_open
265
 
 */
266
 
struct proc_mgr_cmd_args_open {
267
 
        struct proc_mgr_cmd_args commond_args;
268
 
        /*Common command args */
269
 
        u16 proc_id;
270
 
        /*Processor ID represented by this ProcMgr instance */
271
 
        void *handle;
272
 
        /*Handle to the opened ProcMgr object. */
273
 
        struct proc_mgr_proc_info proc_info;
274
 
        /*Processor information.  */
275
 
};
276
 
 
277
 
/*
278
 
 * Command arguments for ProcMgr_close
279
 
 */
280
 
struct proc_mgr_cmd_args_close{
281
 
        struct proc_mgr_cmd_args commond_args;
282
 
        /*Common command args */
283
 
        void *handle;
284
 
        /*Handle to the ProcMgr object */
285
 
        struct proc_mgr_proc_info proc_info;
286
 
        /*Processor information.  */
287
 
};
288
 
 
289
 
/*
290
 
 * Command arguments for ProcMgr_getAttachParams
291
 
 */
292
 
struct proc_mgr_cmd_args_get_attach_params{
293
 
        struct proc_mgr_cmd_args commond_args;
294
 
        /*Common command args */
295
 
        void *handle;
296
 
        /*Handle to the ProcMgr object. */
297
 
        struct proc_mgr_attach_params *params;
298
 
        /*Pointer to the ProcMgr attach params structure in which the default
299
 
         params is to be returned. */
300
 
};
301
 
 
302
 
/*
303
 
 * Command arguments for ProcMgr_attach
304
 
 */
305
 
struct proc_mgr_cmd_args_attach {
306
 
        struct proc_mgr_cmd_args commond_args;
307
 
        /*Common command args */
308
 
        void *handle;
309
 
        /*Handle to the ProcMgr object. */
310
 
        struct proc_mgr_attach_params *params;
311
 
        /*Optional ProcMgr attach parameters.  */
312
 
        struct proc_mgr_proc_info proc_info;
313
 
        /*Processor information.  */
314
 
};
315
 
 
316
 
/*
317
 
 * Command arguments for ProcMgr_detach
318
 
 */
319
 
struct proc_mgr_cmd_args_detach {
320
 
        struct proc_mgr_cmd_args commond_args;
321
 
        /*Common command args */
322
 
        void *handle;
323
 
        /*Handle to the ProcMgr object */
324
 
        struct proc_mgr_proc_info proc_info;
325
 
        /*Processor information.  */
326
 
};
327
 
 
328
 
 
329
 
/*
330
 
 * Command arguments for ProcMgr_getStartParams
331
 
 */
332
 
struct proc_mgr_cmd_args_get_start_params {
333
 
        struct proc_mgr_cmd_args commond_args;
334
 
        /*Common command args */
335
 
        void *handle;
336
 
        /*Entry point for the image*/
337
 
        u32 entry_point;
338
 
        /*Handle to the ProcMgr object */
339
 
        struct proc_mgr_start_params *params;
340
 
        /*Pointer to the ProcMgr start params structure in which the default
341
 
         params is to be returned. */
342
 
};
343
 
 
344
 
/*
345
 
 * Command arguments for ProcMgr_getState
346
 
 */
347
 
struct proc_mgr_cmd_args_get_state {
348
 
        struct proc_mgr_cmd_args commond_args;
349
 
        /*Common command args */
350
 
        void *handle;
351
 
        /* Handle to the ProcMgr object */
352
 
        enum proc_mgr_state proc_mgr_state;
353
 
        /*Current state of the ProcMgr object. */
354
 
};
355
 
 
356
 
/*
357
 
 * Command arguments for ProcMgr_read
358
 
 */
359
 
struct proc_mgr_cmd_args_read {
360
 
        struct proc_mgr_cmd_args commond_args;
361
 
        /*Common command args */
362
 
        void *handle;
363
 
        /*Handle to the ProcMgr object */
364
 
        u32 proc_addr;
365
 
        /*Address in space processor's address space of the memory region to
366
 
         read from. */
367
 
        u32 num_bytes;
368
 
        /*IN/OUT parameter. As an IN-parameter, it takes in the number of bytes
369
 
         to be read. When the function returns, this parameter contains the
370
 
         number of bytes actually read. */
371
 
        void *buffer;
372
 
        /*User-provided buffer in which the slave processor's memory contents
373
 
         are to be copied. */
374
 
};
375
 
 
376
 
/*
377
 
 * Command arguments for ProcMgr_write
378
 
 */
379
 
struct proc_mgr_cmd_args_write {
380
 
        struct proc_mgr_cmd_args commond_args;
381
 
        /*Common command args */
382
 
        void *handle;
383
 
        /*Handle to the ProcMgr object */
384
 
        u32 proc_addr;
385
 
        /*Address in space processor's address space of the memory region to
386
 
         write into. */
387
 
        u32 num_bytes;
388
 
        /*IN/OUT parameter. As an IN-parameter, it takes in the number of bytes
389
 
         to be written. When the function returns, this parameter contains the
390
 
         number of bytes actually written. */
391
 
        void *buffer;
392
 
        /*User-provided buffer from which the data is to be written into the
393
 
         slave processor's memory. */
394
 
};
395
 
 
396
 
/*
397
 
 * Command arguments for ProcMgr_control
398
 
 */
399
 
struct proc_mgr_cmd_args_control {
400
 
        struct proc_mgr_cmd_args commond_args;
401
 
        /*Common command args */
402
 
        void *handle;
403
 
        /*Handle to the ProcMgr object */
404
 
        int cmd;
405
 
        /*Device specific processor command */
406
 
        void *arg;
407
 
        /*Arguments specific to the type of command. */
408
 
};
409
 
 
410
 
/*
411
 
 * Command arguments for ProcMgr_translateAddr
412
 
 */
413
 
struct proc_mgr_cmd_args_translate_addr {
414
 
        struct proc_mgr_cmd_args commond_args;
415
 
        /*Common command args */
416
 
        void *handle;
417
 
        /*Handle to the ProcMgr object */
418
 
        void *dst_addr;
419
 
        /*Return parameter: Pointer to receive the translated address. */
420
 
        enum proc_mgr_addr_type dst_addr_type;
421
 
        /*Destination address type requested */
422
 
        void *src_addr;
423
 
        /*Source address in the source address space */
424
 
        enum proc_mgr_addr_type src_addr_type;
425
 
        /*Source address type */
426
 
};
427
 
 
428
 
/*
429
 
 * Command arguments for ProcMgr_getSymbolAddress
430
 
 */
431
 
struct proc_mgr_cmd_args_get_symbol_address {
432
 
        struct proc_mgr_cmd_args commond_args;
433
 
        /*Common command args */
434
 
        void *handle;
435
 
        /*Handle to the ProcMgr object */
436
 
        u32 file_id;
437
 
        /*ID of the file received from the load function */
438
 
        char *symbol_name;
439
 
        /*Name of the symbol */
440
 
        u32 sym_value;
441
 
        /*Return parameter: Symbol address */
442
 
};
443
 
 
444
 
/*
445
 
 * Command arguments for ProcMgr_registerNotify
446
 
 */
447
 
struct proc_mgr_cmd_args_register_notify {
448
 
        struct proc_mgr_cmd_args commond_args;
449
 
        /*Common command args */
450
 
        void *handle;
451
 
        /*Handle to the ProcMgr object */
452
 
        int (*callback_fxn)(u16 proc_id, void *handle,
453
 
                enum proc_mgr_state from_state, enum proc_mgr_state to_state);
454
 
        /*Handling function to be registered. */
455
 
        void *args;
456
 
        /*Optional arguments associated with the handler fxn. */
457
 
        enum proc_mgr_state state[];
458
 
        /*Array of target states for which registration is required. */
459
 
};
460
 
 
461
 
/*
462
 
 * Command arguments for ProcMgr_getProcInfo
463
 
 */
464
 
struct proc_mgr_cmd_args_get_proc_info {
465
 
        struct proc_mgr_cmd_args commond_args;
466
 
        /*Common command args */
467
 
        void *handle;
468
 
        /*Handle to the ProcMgr object */
469
 
        struct proc_mgr_proc_info *proc_info;
470
 
        /*Pointer to the ProcInfo object to be populated. */
471
 
};
472
 
 
473
 
/*
474
 
 * Command arguments for ProcMgr_virtToPhys
475
 
 */
476
 
struct proc_mgr_cmd_args_get_virt_to_phys {
477
 
        struct proc_mgr_cmd_args commond_args;
478
 
        /*Common command args */
479
 
        void *handle;
480
 
        u32 da;
481
 
        /* mem entries buffer */
482
 
        u32 *mem_entries;
483
 
        /* number of entries */
484
 
        u32 num_of_entries;
485
 
};
486
 
 
487
 
struct proc_mgr_cmd_args_cpurev {
488
 
        struct proc_mgr_cmd_args commond_args;
489
 
        u32 *cpu_rev;
490
 
};
491
 
#endif