1
2
3
4
5
6
7
8
9
10
11
12 #ifndef __CS46XX_DSP_TASK_TYPES_H__
13 #define __CS46XX_DSP_TASK_TYPES_H__
14
15 #include "cs46xx_dsp_scb_types.h"
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 #define HFG_FIRST_EXECUTE_MODE 0x0001
40 #define HFG_FIRST_EXECUTE_MODE_BIT 0
41 #define HFG_CONTEXT_SWITCH_MODE 0x0002
42 #define HFG_CONTEXT_SWITCH_MODE_BIT 1
43
44 #define MAX_FG_STACK_SIZE 32
45 #define MAX_MG_STACK_SIZE 16
46 #define MAX_BG_STACK_SIZE 9
47 #define MAX_HFG_STACK_SIZE 4
48
49 #define SLEEP_ACTIVE_INCREMENT 0
50
51 #define STANDARD_ACTIVE_INCREMENT 1
52 #define SUSPEND_ACTIVE_INCREMENT 2
53
54
55 #define HOSTFLAGS_DISABLE_BG_SLEEP 0
56
57
58
59 struct dsp_hf_save_area {
60 u32 r10_save;
61 u32 r54_save;
62 u32 r98_save;
63
64 ___DSP_DUAL_16BIT_ALLOC(
65 status_save,
66 ind_save
67 )
68
69 ___DSP_DUAL_16BIT_ALLOC(
70 rci1_save,
71 rci0_save
72 )
73
74 u32 r32_save;
75 u32 r76_save;
76 u32 rsd2_save;
77
78 ___DSP_DUAL_16BIT_ALLOC(
79 rsi2_save,
80
81 rsa2Save
82 )
83
84 };
85
86
87
88 struct dsp_tree_link {
89 ___DSP_DUAL_16BIT_ALLOC(
90
91 next_scb,
92
93 sub_ptr
94 )
95
96 ___DSP_DUAL_16BIT_ALLOC(
97
98 entry_point,
99
100 this_spb
101 )
102 };
103
104
105 struct dsp_task_tree_data {
106 ___DSP_DUAL_16BIT_ALLOC(
107
108 tock_count_limit,
109
110 tock_count
111 )
112
113
114
115 ___DSP_DUAL_16BIT_ALLOC(
116 active_tncrement,
117
118 active_count
119 )
120
121 ___DSP_DUAL_16BIT_ALLOC(
122
123 active_bit,
124
125 active_task_flags_ptr
126 )
127
128
129
130 ___DSP_DUAL_16BIT_ALLOC(
131 mem_upd_ptr,
132
133 link_upd_ptr
134 )
135
136 ___DSP_DUAL_16BIT_ALLOC(
137
138 save_area,
139
140 data_stack_base_ptr
141 )
142
143 };
144
145
146 struct dsp_interval_timer_data
147 {
148
149 ___DSP_DUAL_16BIT_ALLOC(
150 interval_timer_period,
151 itd_unused
152 )
153
154
155 ___DSP_DUAL_16BIT_ALLOC(
156 num_FG_ticks_this_interval,
157 num_intervals
158 )
159 };
160
161
162
163
164 struct dsp_task_tree_context_block {
165
166
167
168 ___DSP_DUAL_16BIT_ALLOC(
169 stack1,
170 stack0
171 )
172 ___DSP_DUAL_16BIT_ALLOC(
173 stack3,
174 stack2
175 )
176 ___DSP_DUAL_16BIT_ALLOC(
177 stack5,
178 stack4
179 )
180 ___DSP_DUAL_16BIT_ALLOC(
181 stack7,
182 stack6
183 )
184 ___DSP_DUAL_16BIT_ALLOC(
185 stack9,
186 stack8
187 )
188
189 u32 saverfe;
190
191
192
193 ___DSP_DUAL_16BIT_ALLOC(
194 reserved1,
195 stack_size
196 )
197 u32 saverba;
198 u32 saverdc;
199 u32 savers_config_23;
200 u32 savers_DMA23;
201 u32 saversa0;
202 u32 saversi0;
203 u32 saversa1;
204 u32 saversi1;
205 u32 saversa3;
206 u32 saversd0;
207 u32 saversd1;
208 u32 saversd3;
209 u32 savers_config01;
210 u32 savers_DMA01;
211 u32 saveacc0hl;
212 u32 saveacc1hl;
213 u32 saveacc0xacc1x;
214 u32 saveacc2hl;
215 u32 saveacc3hl;
216 u32 saveacc2xacc3x;
217 u32 saveaux0hl;
218 u32 saveaux1hl;
219 u32 saveaux0xaux1x;
220 u32 saveaux2hl;
221 u32 saveaux3hl;
222 u32 saveaux2xaux3x;
223 u32 savershouthl;
224 u32 savershoutxmacmode;
225 };
226
227
228 struct dsp_task_tree_control_block {
229 struct dsp_hf_save_area context;
230 struct dsp_tree_link links;
231 struct dsp_task_tree_data data;
232 struct dsp_task_tree_context_block context_blk;
233 struct dsp_interval_timer_data int_timer;
234 };
235
236
237 #endif