FreeCalypso > hg > freecalypso-citrine
comparison L1/dyn_dwl_cfile/l1_dyn_dwl_afunc.c @ 21:dfc7b0bc468a
L1/dyn_dwl_cfile/*.c: initial import from tcs211-l1-reconst
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Fri, 10 Jun 2016 08:59:53 +0000 |
parents | 75a11d740a02 |
children | fc33e796507a |
comparison
equal
deleted
inserted
replaced
20:5fd4e7669c93 | 21:dfc7b0bc468a |
---|---|
5 * Filename l1_dyn_dwl_afunc.c | 5 * Filename l1_dyn_dwl_afunc.c |
6 * Copyright 2004 (C) Texas Instruments | 6 * Copyright 2004 (C) Texas Instruments |
7 * | 7 * |
8 ************* Revision Controle System Header *************/ | 8 ************* Revision Controle System Header *************/ |
9 | 9 |
10 #include "config.h" | |
11 #include "l1_confg.h" | 10 #include "l1_confg.h" |
12 #include "l1_types.h" | 11 #include "l1_types.h" |
13 #include "sys_types.h" | 12 #include "sys_types.h" |
14 #include "../../gpf/inc/cust_os.h" | 13 #include "cust_os.h" |
15 #include "l1_macro.h" | 14 #include "l1_macro.h" |
16 #include "l1_const.h" | 15 #include "l1_const.h" |
17 #if TESTMODE | 16 #if TESTMODE |
18 #include "l1tm_defty.h" | 17 #include "l1tm_defty.h" |
19 #endif | 18 #endif |
186 | 185 |
187 UWORD16 l1_lookup_primitive_patch_matrix(UWORD32 msg_code, UWORD16* patch_id_p) | 186 UWORD16 l1_lookup_primitive_patch_matrix(UWORD32 msg_code, UWORD16* patch_id_p) |
188 { | 187 { |
189 UWORD16 j; | 188 UWORD16 j; |
190 UWORD16 counter=0; | 189 UWORD16 counter=0; |
191 UWORD16 msg_code_id=0 ;//omaps00090550 | 190 UWORD16 msg_code_id; |
192 | 191 |
193 // Check if one of the messages belongs to the set of primitves which triggers a dynamic download and saves its index | 192 // Check if one of the messages belongs to the set of primitves which triggers a dynamic download and saves its index |
194 | 193 |
195 #if 0 // LoCosto-ism not present in TCS211 | 194 #if 0 // LoCosto-ism not present in TCS211 |
196 if (!((l1a.state[L1A_GTT_STATE] == 0) || (l1a.state[L1A_GTT_STATE] == 1))) // TTY ON | 195 if (!((l1a.state[L1A_GTT_STATE] == 0) || (l1a.state[L1A_GTT_STATE] == 1))) // TTY ON |
409 } | 408 } |
410 } | 409 } |
411 } | 410 } |
412 } | 411 } |
413 | 412 |
413 /* | |
414 * TCS211 had l1_disable_DSP_trace() and l1_enable_DSP_trace() functions | |
415 * implemented here in the l1_dyn_dwl code. The LoCosto version of L1 | |
416 * has l1_{dis,en}able_dsp_trace() instead (note the case difference) | |
417 * implemented in the l1_trace.c module. The LoCosto versions of these | |
418 * functions implement more complex logic with nesting, and use more | |
419 * state variables than are provided in TCS211 L1 data structures which | |
420 * we cannot change at this early phase of deblobbing. Therefore, | |
421 * we are going to recreate the simpler logic of the older | |
422 * l1_{dis,en}able_DSP_trace() functions from disassembly. | |
423 */ | |
424 | |
425 void l1_disable_DSP_trace() | |
426 { | |
427 #if (CODE_VERSION != SIMULATION) | |
428 T_NDB_MCU_DSP* dsp_ndb_ptr = (T_NDB_MCU_DSP *) NDB_ADR; | |
429 #else | |
430 T_NDB_MCU_DSP* dsp_ndb_ptr = l1s_dsp_com.dsp_ndb_ptr; | |
431 #endif | |
432 | |
433 if (dsp_ndb_ptr->d_debug_trace_type != 0x0000) | |
434 { | |
435 l1a.dyn_dwnld.dsp_trace_level_copy = dsp_ndb_ptr->d_debug_trace_type; | |
436 dsp_ndb_ptr->d_debug_trace_type = (API)0x8000; /* 0x9000 in LoCosto */ | |
437 l1a.dyn_dwnld.trace_flag_blocked = TRUE; | |
438 } | |
439 } | |
440 | |
441 void l1_enable_DSP_trace() | |
442 { | |
443 #if (CODE_VERSION != SIMULATION) | |
444 T_NDB_MCU_DSP* dsp_ndb_ptr = (T_NDB_MCU_DSP *) NDB_ADR; | |
445 #else | |
446 T_NDB_MCU_DSP* dsp_ndb_ptr = l1s_dsp_com.dsp_ndb_ptr; | |
447 #endif | |
448 | |
449 if ((l1a.dyn_dwnld.trace_flag_blocked == TRUE) && (dsp_ndb_ptr->d_debug_trace_type == 0x0000)) | |
450 { | |
451 l1a.dyn_dwnld.trace_flag_blocked = FALSE; | |
452 | |
453 dsp_ndb_ptr->d_debug_trace_type = (API)l1a.dyn_dwnld.dsp_trace_level_copy | 0x8000; | |
454 l1a.dyn_dwnld.dsp_trace_level_copy = 0x0000; | |
455 } | |
456 } | |
414 | 457 |
415 /*---------------------------------------------------------- */ | 458 /*---------------------------------------------------------- */ |
416 /* l1_push_Primitive */ | 459 /* l1_push_Primitive */ |
417 /*---------------------------------------------------------- */ | 460 /*---------------------------------------------------------- */ |
418 /* */ | 461 /* */ |