changeset 77:4bdffcf1467a

l1_dyn_dwl_async.c: perfect match to original TCS211 object
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Tue, 29 Mar 2016 06:21:36 +0000
parents a05803fbe089
children 6219bb2f0a52
files chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_async.c
diffstat 1 files changed, 42 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_async.c	Tue Mar 29 04:58:46 2016 +0000
+++ b/chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_async.c	Tue Mar 29 06:21:36 2016 +0000
@@ -640,6 +640,7 @@
             
             //  Check if there is any pending primitive waiting to be de-queued
             {
+#if 0	/* LoCosto code */
               UWORD32 remaining_primitive_flag=0;
               UWORD32 process_continue_flag=1;
               UWORD32 delay_primitive_processed_flag=0;
@@ -657,15 +658,15 @@
                   l1a_apihisr_com.dyn_dwnld.command.restart = TRUE;
 
                   /********** WORKAROUND *************/
-#if (OP_RIV_AUDIO == 1)
+                #if (OP_RIV_AUDIO == 1)
                   {
                     // WARNING: temporary until os_activate_hisr() is declared in L3 functions
                     extern NU_HISR apiHISR;
                     NU_Activate_HISR(&apiHISR);
                   }
-#else
+                #else
                   os_activate_hisr(API_HISR);
-#endif // OP_RIV_AUDIO == 1         
+                #endif // OP_RIV_AUDIO == 1         
                   /********** WORKAROUND *************/
                   *state = WAIT_RESULT;
                 }
@@ -675,14 +676,50 @@
               // else stop the DSP background task as no other patch must be downloaded
               if(delay_primitive_processed_flag == 0)
               {
-#if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4))
+              #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4))
                 // Enable trace DSP upon Dynamic Download deactivation
                 l1_enable_DSP_trace();
                 //Trace_dsp_dump();
-#endif  // omaps00090550 #14-D removal
+              #endif  // omaps00090550 #14-D removal
                 l1a_l1s_com.dyn_dwnld_task.stop=TRUE;
                 *state = WAIT_STOP;
               }
+
+#else	/* TCS211 reconstruction from disassembly */
+
+              if (l1_check_Fifo_Primitive() != 0)
+              {
+                l1_pop_Primitive(&(delay_primitive));
+                if (l1_dynamic_download_manager(delay_primitive, TRUE) == TRUE)
+                {
+                  // If yes set the restart command at apihisr level
+                  l1a_apihisr_com.dyn_dwnld.command.restart = TRUE;
+
+                  /********** WORKAROUND *************/
+                #if (OP_RIV_AUDIO == 1)
+                  {
+                    // WARNING: temporary until os_activate_hisr() is declared in L3 functions
+                    extern NU_HISR apiHISR;
+                    NU_Activate_HISR(&apiHISR);
+                  }
+                #else
+                  os_activate_hisr(API_HISR);
+                #endif // OP_RIV_AUDIO == 1         
+                  /********** WORKAROUND *************/
+                  *state = WAIT_RESULT;
+                }
+              }
+              else
+              {
+              #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4))
+                // Enable trace DSP upon Dynamic Download deactivation
+                l1_enable_DSP_trace();
+                //Trace_dsp_dump();
+              #endif  // omaps00090550 #14-D removal
+                l1a_l1s_com.dyn_dwnld_task.stop=TRUE;
+                *state = WAIT_STOP;
+              }
+#endif
             }
           }
           break;