changeset 79:3fca27cfa433

l1_dyn_dwl_init.c: made to match TCS211 except for num_of_primitives mystery
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Tue, 29 Mar 2016 08:22:13 +0000
parents 6219bb2f0a52
children 6c740cf30da3
files chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_init.c
diffstat 1 files changed, 27 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_init.c	Tue Mar 29 06:50:07 2016 +0000
+++ b/chipsetsw/layer1/dyn_dwl_cfile/l1_dyn_dwl_init.c	Tue Mar 29 08:22:13 2016 +0000
@@ -109,7 +109,6 @@
 void l1_dyn_dwnld_initialize_var()
 {
   UWORD16 i;
-  
 
   /* Init Dynamic Download NDB */
   dyn_dwl_ndb=(T_DYN_DWNLD_MCU_DSP *)API_address_dsp2mcu(C_DYN_DWNLD_API_BASE_ADDRESS);
@@ -128,32 +127,48 @@
     l1s_dsp_com.dsp_ndb_ptr->d_max_background=(API)(C_BGD_DSP_DYN_DWNLD+1);
 
   dyn_dwnld_copy_MCU_vect[0] = gprs_patch_array;
+  l1_set_dyn_dwnld_install_vect(size_vect,dyn_dwnld_address_vect,dyn_dwnld_crc_vect, gprs_patch_array, 0);
+
   dyn_dwnld_copy_MCU_vect[1] = amr_sch_patch_array;
+  l1_set_dyn_dwnld_install_vect(size_vect,dyn_dwnld_address_vect,dyn_dwnld_crc_vect, amr_sch_patch_array, 1);
+
   #if (L1_GTT == 1)
     dyn_dwnld_copy_MCU_vect[2] = tty_patch_array;
+    l1_set_dyn_dwnld_install_vect(size_vect,dyn_dwnld_address_vect,dyn_dwnld_crc_vect, tty_patch_array, 2);
   #endif
+
   #if (MELODY_E2 == 1)
     dyn_dwnld_copy_MCU_vect[3] = amr_mms_patch_array;
+    l1_set_dyn_dwnld_install_vect(size_vect,dyn_dwnld_address_vect,dyn_dwnld_crc_vect, amr_mms_patch_array, 3);
     dyn_dwnld_copy_MCU_vect[4] = e2_patch_array;
+    l1_set_dyn_dwnld_install_vect(size_vect,dyn_dwnld_address_vect,dyn_dwnld_crc_vect, e2_patch_array, 4);
   #endif
 
-  for(i=0;i<MAX_NUM_OF_PATCH_IDS;i++)
-  {
-    if (dyn_dwnld_copy_MCU_vect[i] != 0)
-    {
-      l1_set_dyn_dwnld_install_vect(size_vect,dyn_dwnld_address_vect,dyn_dwnld_crc_vect,dyn_dwnld_copy_MCU_vect[i],i);
-    }
-  }
-
   /*---------- Set L1A globals at phone init ----------------------------*/
   l1a.dyn_dwnld.melody0_E2_flag_activated = FALSE;
   l1a.dyn_dwnld.melody1_E2_flag_activated = FALSE;
+  l1a.dyn_dwnld.dedicated_stop_flag       = FALSE;
+
+  l1a.dyn_dwnld.num_patches_installed     = 2;
   l1a.dyn_dwnld.state                     = 0;
-  
+  l1a.dyn_dwnld.dsp_trace_level_copy      = 0;
+
+  l1a.dyn_dwnld.patch_id[0] = GPRS_PATCH;
+  l1a.dyn_dwnld.patch_id[1] = AMR_MMS_PATCH;
 
-  l1a.dyn_dwnld.num_patches_installed     = 0;  
+  for (i=l1a.dyn_dwnld.num_patches_installed;i<MAX_NUM_OF_PATCH_IDS;i++)
+  {  
+    l1a.dyn_dwnld.patch_id[i]      = 0xFFFF; //omaps00090550 ;
+    l1a.dyn_dwnld.next_patch_id[i] = 0xFFFF; //omaps00090550 ;
+  }
+  for (i=0;i<MAX_NUM_OF_SEMAPHORES;i++)
+     l1a.dyn_dwnld.semaphore_vect[i] = GREEN;
 
-  l1a.dyn_dwnld.patch_id[0] = 0xFFFF; //omaps00090550
+  l1a.dyn_dwnld.trace_flag_blocked = FALSE;
+
+  l1a.dyn_dwnld.waiting_patch_fifo.num_of_elem = 0;
+  for (i=0;i<MAX_NUM_OF_PATCH_IDS;i++)
+    l1a.dyn_dwnld.waiting_patch_fifo.signal_code_vect[i] = 0;
 
   /**************************************************/
 
@@ -168,19 +183,7 @@
     l1a.dyn_dwnld.num_of_primitives += 3;
   #endif // MELODY_E2
 
-  for (i=l1a.dyn_dwnld.num_patches_installed;i<MAX_NUM_OF_PATCH_IDS;i++)
-  {  
-    l1a.dyn_dwnld.patch_id[i]      = 0xFFFF; //omaps00090550 ;
-    l1a.dyn_dwnld.next_patch_id[i] = 0xFFFF; //omaps00090550 ;
-  }
-  for (i=0;i<MAX_NUM_OF_SEMAPHORES;i++)
-     l1a.dyn_dwnld.semaphore_vect[i] = GREEN;
 
-   
-    l1a.dyn_dwnld.waiting_patch_fifo.num_of_elem = 0;
-    for (i=0;i<MAX_NUM_OF_PATCH_IDS;i++)
-      l1a.dyn_dwnld.waiting_patch_fifo.signal_code_vect[i] = 0;
-  
   /*---------------------------------------------------------------------*/
 
   /*---------- Set L1S globals at phone init ----------------------------*/