changeset 139:44cd24bfe9d0

l1_sync.c: l1_ext compilation passes, l1_int still fails
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sun, 15 May 2016 01:38:28 +0000
parents aee61e6a8b8f
children cc68be0c4b80
files chipsetsw/layer1/cfile/l1_sync.c
diffstat 1 files changed, 33 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/cfile/l1_sync.c	Sat May 14 23:22:11 2016 +0000
+++ b/chipsetsw/layer1/cfile/l1_sync.c	Sun May 15 01:38:28 2016 +0000
@@ -182,10 +182,11 @@
   #include "prf/prf_api.h"
 #endif
 
-
+#if 0	/* FreeCalypso TCS211 reconstruction */
 //Enhanced RSSI    -OMAPS00075410
 #define TOTAL_NO_OF_BITS_IDLE_MEAS    625
 extern UWORD32 qual_acc_idle1[2];
+#endif
 
 #if (RF_FAM == 61)
   #include "tpudrv61.h"
@@ -361,32 +362,12 @@
   extern unsigned short       layer_1_sync_end_time;
   void hisr(void)
   {
-    #if (TRACE_TYPE == 4) && (TI_NUC_MONITOR != 1) && (WCP_PROF == 0)
-       if(trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_L1S_CPU_LOAD)
-       {
-          TM_ResetTimer (2, TIMER_RESET_VALUE, 0, 0);
-          TM_StartTimer (2);
-       }
-    #endif
-
-    #if (GSM_IDLE_RAM_DEBUG == 1)
-      (*( volatile unsigned short* )(0xFFFE4802)) |= (1 << 2);    // GPIO-2=1
-    #endif
-
-/*
- * FreeCalypso change: the conditioned-out GPIO twiddling below appears in
- * the LoCosto version of this L1 code without any conditionals around it.
- * Checking the disassembly of the Leonardo binary object confirms that
- * NO GPIO muck takes places in that version.  Needless to say, I am
- * disabling it for FreeCalypso - we don't want to wreak havoc on some
- * target that uses GPIO 0 for something else.
- */
-#if 0
-   // Configure GPIO0 pin as output - Reset Bit 0 i.e. set Bit 0 to 0
-   (*( volatile unsigned short* )(0xFFFE4804)) &= (~(1 << 0));    // GPIO-2=1
-   // write 1 in GPIO pin 0
-   (*( volatile unsigned short* )(0xFFFE4802)) |= (1 << 0);    // GPIO-2=1
-#endif
+    /*
+     * FreeCalypso TCS211 reconstruction: the LoCosto version
+     * of this function had a whole bunch of junk here
+     * which we have removed in order to match the TCS211
+     * binary object.
+     */
 
     // stop the gauging.This function must be called at the
     // begining of the HISR in order to have the IT_GAUGING
@@ -399,7 +380,7 @@
       if (TPU_check_IT_DSP()==TRUE)
       {
         #if (GSM_IDLE_RAM == 0)
-         l1_trace_IT_DSP_error(IT_DSP_ERROR_CPU_OVERLOAD);
+         l1_trace_IT_DSP_error();
         #else
          l1_trace_IT_DSP_error_intram();
         #endif
@@ -470,6 +451,11 @@
 
     l1s_synch();
 
+    /*
+     * The following double invokation of l1s_synch()
+     * is NOT present in the TCS211 version.
+     */
+    #if 0
     if(l1s.pw_mgr.sleep_performed == CLOCK_STOP &&
 	(l1s.pw_mgr.wakeup_type == WAKEUP_FOR_L1_TASK ||
 	 l1s.pw_mgr.wakeup_type == WAKEUP_ASYNCHRONOUS_ULPD_0 ||
@@ -479,6 +465,7 @@
     {
 	l1s_synch();
     }
+    #endif
 
     // Be careful:in case of asynchronous wake-up after sleep
     // an IT_TDMA may be unmasked and executed just after l1s_sleep_manager();
@@ -498,7 +485,8 @@
     #endif
 
 
-    #if (TRACE_TYPE == 1) || (TRACE_TYPE == 4)
+    /* used to be #if (TRACE_TYPE == 1) || (TRACE_TYPE == 4) in LoCosto */
+    #if (TRACE_TYPE == 1)	/* TSM30 code has it this way */
       // CPU load for TRACE_TYPE == 1 and 4 only
       if((trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_L1S_CPU_LOAD) &&
           (trace_info.sleep_performed == FALSE))
@@ -523,20 +511,6 @@
       l1_cpu_load_stop();
     #endif
 
-    #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4)) && (DSP >= 38)
-      // DSP CPU load for TRACE_TYPE == 1 and 4 only
-      if(trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_DSP_CPU_LOAD)
-      {
-        // DSP CPU load measurement
-        l1_dsp_cpu_load_read();
-      }
-    #endif
-
-#if 0
-   // write 0 in GPIO pin 0
-   (*( volatile unsigned short* )(0xFFFE4802)) &= (~(1 << 0));    // GPIO-2=1
-#endif
-
   }
 
 #endif // NO SIMULATION
@@ -6128,17 +6102,21 @@
         ((T_L1C_RXLEV_PERIODIC_DONE*)(pch_msg->SigP))->ba_id = l1a_l1s_com.ba_list.ba_id;
 // Enhanced RSSI
 
+	#if 0	/* FreeCalypso TCS211 reconstruction */
          ((T_L1C_RXLEV_PERIODIC_DONE*)(pch_msg->SigP))->qual_acc_idle =qual_acc_idle1[0] ;
 
          ((T_L1C_RXLEV_PERIODIC_DONE*)(pch_msg->SigP))->qual_nbr_meas_idle =qual_acc_idle1[1]* TOTAL_NO_OF_BITS_IDLE_MEAS;
+	#endif
 
         // send L1C_RXLEV_PERIODIC_IND message...
         os_send_sig(pch_msg, L1C1_QUEUE);
         DEBUGMSG(status,NU_SEND_QUEUE_ERR)
 
+	#if 0	/* FreeCalypso TCS211 reconstruction */
        // Reseting the value
        qual_acc_idle1[0]= 0;
        qual_acc_idle1[1] =0;
+	#endif
 
         // Reset pointer for debugg.
         pch_msg = NULL;
@@ -6365,7 +6343,7 @@
 
         lna_off = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].lna_off;
         // Get AGC according to the last known IL.
-        agc     = Cust_get_agc_from_IL(radio_freq_ctrl, l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].input_level >> 1, PWR_ID,lna_off);
+        agc     = Cust_get_agc_from_IL(radio_freq_ctrl, l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].input_level >> 1, PWR_ID);
 
         // Memorize the IL used for AGC setting.
         l1a_l1s_com.ba_list.used_il[i]  = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].input_level;
@@ -6379,7 +6357,7 @@
        lna_off = l1a_l1s_com.last_input_level[operative_radio_freq].lna_off;
         // Get AGC according to the last known IL.
         agc     = 
-            Cust_get_agc_from_IL(radio_freq_ctrl, l1a_l1s_com.last_input_level[operative_radio_freq].input_level >> 1, PWR_ID,lna_off);
+            Cust_get_agc_from_IL(radio_freq_ctrl, l1a_l1s_com.last_input_level[operative_radio_freq].input_level >> 1, PWR_ID);
 
         // Memorize the IL used for AGC setting.
         l1a_l1s_com.ba_list.used_il[i]  = 
@@ -6601,7 +6579,7 @@
 #if (L1_FF_MULTIBAND == 0)  
 
           lna_off = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].lna_off;
-          agc     = Cust_get_agc_from_IL(radio_freq_ctrl, l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].input_level >> 1, PWR_ID, lna_off);
+          agc     = Cust_get_agc_from_IL(radio_freq_ctrl, l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].input_level >> 1, PWR_ID);
 
 
           // Store IL used for current CTRL in order to be able to build IL from pm
@@ -6617,7 +6595,7 @@
           lna_off = 
             l1a_l1s_com.last_input_level[operative_radio_freq].lna_off;
           agc     = 
-            Cust_get_agc_from_IL(radio_freq_ctrl, l1a_l1s_com.last_input_level[operative_radio_freq].input_level >> 1, PWR_ID, lna_off);
+            Cust_get_agc_from_IL(radio_freq_ctrl, l1a_l1s_com.last_input_level[operative_radio_freq].input_level >> 1, PWR_ID);
 
 
           // Store IL used for current CTRL in order to be able to build IL from pm
@@ -6721,7 +6699,7 @@
 #if (L1_FF_MULTIBAND == 0)
           
           lna_off = l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].lna_off;
-          agc     = Cust_get_agc_from_IL(radio_freq_ctrl, l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].input_level >> 1, PWR_ID,lna_off);
+          agc     = Cust_get_agc_from_IL(radio_freq_ctrl, l1a_l1s_com.last_input_level[radio_freq_ctrl - l1_config.std.radio_freq_index_offset].input_level >> 1, PWR_ID);
 
           // Store IL used for current CTRL in order to be able to build IL from pm
           // in READ phase.
@@ -6735,7 +6713,7 @@
           lna_off = 
             l1a_l1s_com.last_input_level[operative_radio_freq].lna_off;
           agc     = 
-            Cust_get_agc_from_IL(radio_freq_ctrl, l1a_l1s_com.last_input_level[operative_radio_freq].input_level >> 1, PWR_ID,lna_off);
+            Cust_get_agc_from_IL(radio_freq_ctrl, l1a_l1s_com.last_input_level[operative_radio_freq].input_level >> 1, PWR_ID);
 
           // Store IL used for current CTRL in order to be able to build IL from pm
           // in READ phase.
@@ -7519,11 +7497,10 @@
         l1a_l1s_com.dedic_set.stop_tch = TRUE;
 
 	/*
-	 * FreeCalypso change: this module was failing to compile without
-	 * AUDIO_TASK enabled because of the following code;
-	 * conditional has been added.
+	 * FreeCalypso TCS211 reconstruction: the following code
+	 * appears to be a LoCosto-ism, so let's take it out.
 	 */
-      #if AUDIO_TASK
+      #if 0
         // If audio enabling was forced by L1S because of a HO failure, do not force it anymore.
         // Restore it in the state required by the MMI if the feature is compiled.
         if (l1a_l1s_com.audio_forced_by_l1s == TRUE)
@@ -7827,7 +7804,7 @@
       l1a_l1s_com.dedic_set.stop_tch = TRUE;
 
       /* FreeCalypso change: same situation as earlier in this function */
-    #if AUDIO_TASK
+    #if 0
       // If audio enabling was forced by L1S because of a HO failure, do not force it anymore.
       // Restore it in the state required by the MMI if the feature is compiled.
       if (l1a_l1s_com.audio_forced_by_l1s == TRUE)
@@ -7873,7 +7850,7 @@
   else
   {
     /* FreeCalypso change: same AUDIO_TASK situation as earlier */
-    #if AUDIO_TASK
+    #if 0
       if (l1a_l1s_com.audio_forced_by_l1s == TRUE)
       {
         #if (L1_EXTERNAL_AUDIO_VOICE_ONOFF == 1)
@@ -8194,7 +8171,7 @@
 	/*
 	 * FreeCalypso change: same AUDIO_TASK conditional issue as earlier.
 	 */
-	#if AUDIO_TASK
+	#if 0
           // CQ: Force the Audio ON to avoid having the DSP reseting the VDLON and producing a pop noise
           // on single ended outputs.
           l1s_dsp_com.dsp_ndb_ptr->d_toneskb_init |= (API) B_AUDIO_ON_START;