Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
drivers
staging
tidspbridge
include
dspbridge
disp.h
Go to the documentation of this file.
1
/*
2
* disp.h
3
*
4
* DSP-BIOS Bridge driver support functions for TI OMAP processors.
5
*
6
* DSP/BIOS Bridge Node Dispatcher.
7
*
8
* Copyright (C) 2005-2006 Texas Instruments, Inc.
9
*
10
* This package is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License version 2 as
12
* published by the Free Software Foundation.
13
*
14
* THIS PACKAGE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
15
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
16
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
17
*/
18
19
#ifndef DISP_
20
#define DISP_
21
22
#include <
dspbridge/dbdefs.h
>
23
#include <
dspbridge/nodedefs.h
>
24
#include <
dspbridge/nodepriv.h
>
25
26
struct
disp_object
;
27
28
/* Node Dispatcher attributes */
29
struct
disp_attr
{
30
u32
chnl_offset
;
/* Offset of channel ids reserved for RMS */
31
/* Size of buffer for sending data to RMS */
32
u32
chnl_buf_size
;
33
int
proc_family
;
/* eg, 5000 */
34
int
proc_type
;
/* eg, 5510 */
35
void
*
reserved1
;
/* Reserved for future use. */
36
u32
reserved2
;
/* Reserved for future use. */
37
};
38
39
40
/*
41
* ======== disp_create ========
42
* Create a NODE Dispatcher object. This object handles the creation,
43
* deletion, and execution of nodes on the DSP target, through communication
44
* with the Resource Manager Server running on the target. Each NODE
45
* Manager object should have exactly one NODE Dispatcher.
46
*
47
* Parameters:
48
* dispatch_obj: Location to store node dispatcher object on output.
49
* hdev_obj: Device for this processor.
50
* disp_attrs: Node dispatcher attributes.
51
* Returns:
52
* 0: Success;
53
* -ENOMEM: Insufficient memory for requested resources.
54
* -EPERM: Unable to create dispatcher.
55
* Requires:
56
* disp_attrs != NULL.
57
* hdev_obj != NULL.
58
* dispatch_obj != NULL.
59
* Ensures:
60
* 0: IS_VALID(*dispatch_obj).
61
* error: *dispatch_obj == NULL.
62
*/
63
extern
int
disp_create
(
struct
disp_object
**dispatch_obj,
64
struct
dev_object
*hdev_obj,
65
const
struct
disp_attr
*disp_attrs);
66
67
/*
68
* ======== disp_delete ========
69
* Delete the NODE Dispatcher.
70
*
71
* Parameters:
72
* disp_obj: Node Dispatcher object.
73
* Returns:
74
* Requires:
75
* Valid disp_obj.
76
* Ensures:
77
* disp_obj is invalid.
78
*/
79
extern
void
disp_delete
(
struct
disp_object
*disp_obj);
80
81
/*
82
* ======== disp_node_change_priority ========
83
* Change the priority of a node currently running on the target.
84
*
85
* Parameters:
86
* disp_obj: Node Dispatcher object.
87
* hnode: Node object representing a node currently
88
* allocated or running on the DSP.
89
* ulFxnAddress: Address of RMS function for changing priority.
90
* node_env: Address of node's environment structure.
91
* prio: New priority level to set node's priority to.
92
* Returns:
93
* 0: Success.
94
* -ETIME: A timeout occurred before the DSP responded.
95
* Requires:
96
* Valid disp_obj.
97
* hnode != NULL.
98
* Ensures:
99
*/
100
extern
int
disp_node_change_priority
(
struct
disp_object
101
*disp_obj,
102
struct
node_object
*hnode,
103
u32
rms_fxn,
104
nodeenv
node_env,
s32
prio
);
105
106
/*
107
* ======== disp_node_create ========
108
* Create a node on the DSP by remotely calling the node's create function.
109
*
110
* Parameters:
111
* disp_obj: Node Dispatcher object.
112
* hnode: Node handle obtained from node_allocate().
113
* ul_fxn_addr: Address or RMS create node function.
114
* ul_create_fxn: Address of node's create function.
115
* pargs: Arguments to pass to RMS node create function.
116
* node_env: Location to store node environment pointer on
117
* output.
118
* Returns:
119
* 0: Success.
120
* -ETIME: A timeout occurred before the DSP responded.
121
* -EPERM: A failure occurred, unable to create node.
122
* Requires:
123
* Valid disp_obj.
124
* pargs != NULL.
125
* hnode != NULL.
126
* node_env != NULL.
127
* node_get_type(hnode) != NODE_DEVICE.
128
* Ensures:
129
*/
130
extern
int
disp_node_create
(
struct
disp_object
*disp_obj,
131
struct
node_object
*hnode,
132
u32
rms_fxn,
133
u32
ul_create_fxn,
134
const
struct
node_createargs
135
*pargs,
nodeenv
*node_env);
136
137
/*
138
* ======== disp_node_delete ========
139
* Delete a node on the DSP by remotely calling the node's delete function.
140
*
141
* Parameters:
142
* disp_obj: Node Dispatcher object.
143
* hnode: Node object representing a node currently
144
* loaded on the DSP.
145
* ul_fxn_addr: Address or RMS delete node function.
146
* ul_delete_fxn: Address of node's delete function.
147
* node_env: Address of node's environment structure.
148
* Returns:
149
* 0: Success.
150
* -ETIME: A timeout occurred before the DSP responded.
151
* Requires:
152
* Valid disp_obj.
153
* hnode != NULL.
154
* Ensures:
155
*/
156
extern
int
disp_node_delete
(
struct
disp_object
*disp_obj,
157
struct
node_object
*hnode,
158
u32
rms_fxn,
159
u32
ul_delete_fxn,
nodeenv
node_env);
160
161
/*
162
* ======== disp_node_run ========
163
* Start execution of a node's execute phase, or resume execution of a node
164
* that has been suspended (via DISP_NodePause()) on the DSP.
165
*
166
* Parameters:
167
* disp_obj: Node Dispatcher object.
168
* hnode: Node object representing a node to be executed
169
* on the DSP.
170
* ul_fxn_addr: Address or RMS node execute function.
171
* ul_execute_fxn: Address of node's execute function.
172
* node_env: Address of node's environment structure.
173
* Returns:
174
* 0: Success.
175
* -ETIME: A timeout occurred before the DSP responded.
176
* Requires:
177
* Valid disp_obj.
178
* hnode != NULL.
179
* Ensures:
180
*/
181
extern
int
disp_node_run
(
struct
disp_object
*disp_obj,
182
struct
node_object
*hnode,
183
u32
rms_fxn,
184
u32
ul_execute_fxn,
nodeenv
node_env);
185
186
#endif
/* DISP_ */
Generated on Thu Jan 10 2013 13:32:41 for Linux Kernel by
1.8.2