1 /*
2  *  Copyright 2001-2008 Texas Instruments - http://www.ti.com/
3  *
4  *  Licensed under the Apache License, Version 2.0 (the "License");
5  *  you may not use this file except in compliance with the License.
6  *  You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *  Unless required by applicable law or agreed to in writing, software
11  *  distributed under the License is distributed on an "AS IS" BASIS,
12  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *  See the License for the specific language governing permissions and
14  *  limitations under the License.
15  */
16 
17 /*
18  *  ======== DSPProcessor_OEM.h ========
19  *  DSP-BIOS Bridge driver support functions for TI OMAP processors.
20  *  Description:
21  *      This is the header for processor OEM fxns.
22  *
23  *  Public Functions:
24  *      DSPProcessor_Ctrl           (OEM-function)
25  *      DSPProcessor_GetTrace       (OEM-function)
26  *      DSPProcessor_Load           (OEM-function)
27  *      DSPProcessor_Start          (OEM-function)
28  *
29  *  Notes:
30  *
31  *! Revision History:
32  *! ================
33  *! 23-Nov-2002 gp: Minor comment spelling correction.
34  *! 13-Feb-2001 kc: DSP/BIOS Bridge name updates.
35  *! 29-Nov-2000 rr: OEM Fxn's are seperated from DSPProcessor.h
36  */
37 
38 #ifndef DSPPROCESSOR_OEM_
39 #define DSPPROCESSOR_OEM_
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 /*
46  *  ======== DSPProcessor_Ctrl ========
47  *  Purpose:
48  *      Pass control information to the GPP device driver managing the DSP
49  *      processor. This will be an OEM-only function, and not part of the
50  *      DSP/BIOS Bridge application developer's API.
51  *  Parameters:
52  *      hProcessor:     The processor handle.
53  *      dwCmd:          Private driver IOCTL cmd ID.
54  *      pArgs:          Ptr to a driver defined argument structure.
55  *  Returns:
56  *      DSP_SOK:        Success.
57  *      DSP_EHANDLE:    Invalid processor handle.
58  *      DSP_ETIMEOUT:   A timeout occured before the control information
59  *                      could be sent.
60  *      DSP_ERESTART:   A critical error has occured and the DSP is being
61  *                      restarted.
62  *      DSP_EFAIL:      Unable to Send the control information.
63  *  Details:
64  *      This function Calls the WMD_BRD_IOCTL.
65  */
66 	extern DBAPI DSPProcessor_Ctrl(DSP_HPROCESSOR hProcessor,
67 				       ULONG dwCmd,
68 				       IN OPTIONAL struct DSP_CBDATA * pArgs);
69 
70 /*
71  *  ======== DSPProcessor_Load ========
72  *  Purpose:
73  *      Reset a processor and load a new base program image.
74  *      This will be an OEM-only function, and not part of the DSP/BIOS Bridge
75  *      application developer's API.
76  *  Parameters:
77  *      hProcessor:         The processor handle.
78  *      iArgc:              The number of arguments (strings) in aArgv[]
79  *      aArgv:              An array of arguments (ANSI Strings)
80  *      aEnvp:              An array of environment settings (ANSI Strings)
81  *  Returns:
82  *      DSP_SOK:            Success.
83  *      DSP_EHANDLE:        Invalid processor handle.
84  *      DSP_EFILE:          The DSP executable was not found
85  *      DSP_ECORRUTFILE:    Unable to Parse the DSP Executable
86  *      DSP_EINVALIDARG:    iArgc should be > 0.
87  *      DSP_EPOINTER:       aArgv is invalid
88  *      DSP_EATTACHED:      Abort because a GPP Client is attached to the
89  *                          specified processor
90  *      DSP_EFAIL:          Unable to load the processor
91  *  Details:
92  *      Does not implement access rights to control which GPP application
93  *      can load the processor.
94  */
95 	extern DBAPI DSPProcessor_Load(DSP_HPROCESSOR hProcessor,
96 				       IN CONST INT iArgc,
97 				       IN CONST CHAR ** aArgv,
98 				       IN CONST CHAR ** aEnvp);
99 
100 /*
101  *  ======== DSPProcessor_Start ========
102  *  Purpose:
103  *      Start a processor running.
104  *      Processor must be in PROC_LOADED state.
105  *      This will be an OEM-only function, and not part of the DSP/BIOS Bridge
106  *      application developer's API.
107  *  Parameters:
108  *      hProcessor:         The processor handle.
109  *  Returns:
110  *      DSP_SOK:            Success.
111  *      DSP_EHANDLE:        Invalid processor handle.
112  *      DSP_EWRONGSTATE:    Processor is not in PROC_LOADED state.
113  *      DSP_EACCESSDENIED:  Client does not have the required access rights
114  *                          to start the Processor
115  *      DSP_EFAIL:          Unable to start the processor.
116  *  Details:
117  */
118 	extern DBAPI DSPProcessor_Start(DSP_HPROCESSOR hProcessor);
119 
120 /*
121  *  ======== DSPProcessor_Stop ========
122  *  Purpose:
123  *      Stop a running processor.
124  *      Processor must be in PROC_LOADED or PROC_RUNNIG state.
125  *      This will be an OEM-only function, and not part of the DSP/BIOS Bridge
126  *      application developer's API.
127  *  Parameters:
128  *      hProcessor:         The processor handle.
129  *  Returns:
130  *      DSP_SOK:            Success.
131  *      DSP_EHANDLE:        Invalid processor handle.
132  *      DSP_EWRONGSTATE:    Processor is not in PROC_LOADED state.
133  *      DSP_EACCESSDENIED:  Client does not have the required access rights
134  *                          to start the Processor
135  *      DSP_EFAIL:          Unable to start the processor.
136  *  Details:
137  */
138 	extern DBAPI DSPProcessor_Stop(DSP_HPROCESSOR hProcessor);
139 
140 #ifdef __cplusplus
141 }
142 #endif
143 #endif				/* DSPPROCESSOR_OEM_ */
144