changeset 225:d32a7e3ba63d

l1tm_func.c: removed LoCosto DRP-specific functions
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 14 Jan 2017 23:13:40 +0000
parents a576fb23046e
children a5d619b2561c
files chipsetsw/layer1/tm_cfile/l1tm_func.c
diffstat 1 files changed, 0 insertions(+), 490 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/tm_cfile/l1tm_func.c	Sat Jan 14 23:00:44 2017 +0000
+++ b/chipsetsw/layer1/tm_cfile/l1tm_func.c	Sat Jan 14 23:13:40 2017 +0000
@@ -151,25 +151,6 @@
 #endif /*if (L1_FF_MULTIBAND == 1)*/
   
 
-#if (DRP_FW_EXT==0)
-  #if (L1_DRP == 1)
-    #include "drp_drive.h"
-    #include "drp_defines.h"
-    #include "drp_api.h"
-    #include "drp_extern_dependencies.h"
-  #endif //L1_DRP
-
-#if (RF_FAM == 61)
-extern T_DRP_SW_DATA drp_sw_data_init;
-extern T_DRP_SW_DATA drp_sw_data_calib;
-extern T_DRP_SW_DATA drp_sw_data_calib_saved;
-extern UINT16 g_pcb_config; //ompas00090550 #262 removal
-#endif // DRP_FW_EXT==0
-#endif
-
-extern void gpio_39_toggle(UINT16 state);
-
-
 // Prototypes from external functions
 //------------------------------------
 UWORD16 Convert_l1_radio_freq(SYS_UWORD16 radio_freq);
@@ -195,20 +176,6 @@
   void Cust_tm_tpu_table_read        (T_TM_RETURN *tm_return, WORD8 index);
 #endif
 
-#if (L1_TPU_DEV == 1)
-  void Cust_tm_flexi_tpu_table_write(T_TM_RETURN * tm_return, WORD8 index, UWORD8 size, WORD16 table[ ]);
-  void Cust_tm_flexi_tpu_table_read(T_TM_RETURN * tm_return, WORD8 index);
-
-  //Flexi ABB Delays
-  void Cust_tm_flexi_abb_write(T_TM_RETURN * tm_return, WORD8 index, UWORD8 size, WORD16 table[ ]);
-  void Cust_tm_flexi_abb_read(T_TM_RETURN * tm_return, WORD8 index);
-
-#endif
-
-// DRP Calibration
-  void l1tm_drp_calib_read(T_TESTMODE_PRIM * prim, T_TM_RETURN * tm_return);
-  void l1tm_drp_calib_write(T_TESTMODE_PRIM * prim, T_TM_RETURN * tm_return);
-
 //------------------------------------
 // Prototypes from external functions
 //------------------------------------
@@ -796,412 +763,6 @@
   } // end switch
 }
 
-#if (L1_DRP == 1)
-  void l1tm_drp_sw_write(T_TESTMODE_PRIM *prim, T_TM_RETURN *tm_return)
-  {
-    WORD8 error=0;
-    tm_return->cid=DRP_SW_WRITE;
-    tm_return->index = prim->u.tm_table.index;
-    tm_return->size = 0;
-
-    #if (ETM_PROTOCOL == 1)
-      tm_return->status = -ETM_OK;
-     #else
-      tm_return->status = E_OK;
-    #endif
-
-    switch (prim->u.tm_table.index)
-    {
-      case FFS_TO_SRM:
-      {
-        #if (OP_L1_STANDALONE ==0)
-          // Call function to load ref sw from FFS to SRM
-          error = drp_ref_sw_upload_from_ffs(prim->u.tm_table.table);
-          if(error < 0)
-          {
-            #if (ETM_PROTOCOL == 1)
-              tm_return->status = -ETM_FATAL;
-            #else
-              tm_return->status = E_INVAL;
-            #endif
-          }
-          else
-          {
-           #if (ETM_PROTOCOL == 1)
-             tm_return->status = -ETM_OK;
-  	      #else
-  	      tm_return->status = E_OK;
-  	    #endif
-          }
-       #else // OP_L1_STANDALONE
-          #if (ETM_PROTOCOL == 1)
-            tm_return->status = -ETM_NOSYS;
-  	  #else
-  	    tm_return->status = (UWORD8)(-E_NOSYS); //omaps00090550
-          #endif
-        #endif// OP_L1_STANDALONE
-        break;
-      }
-
-      default:
-      {
-        // nothing to do now.
-        break;
-      }
-    } // end switch
-  }
-#endif
-
-#if (L1_DRP == 1)
-
-void l1tm_drp_calib_read(T_TESTMODE_PRIM *prim, T_TM_RETURN *tm_return)
-  {
-    // Do Nothing Possible Future use. Intentionally left blank
-   }
-
-void l1tm_drp_calib_write(T_TESTMODE_PRIM *prim, T_TM_RETURN *tm_return)
-  {
-    INT32 error=0;//ompas00090550
-#if (OP_L1_STANDALONE == 1)
-    UINT8  *ptrsrc, *ptrdst;
-    UINT16 indx, strsize;
-#endif
-    UINT16 band;
-    volatile UINT16 * ptr_gpio, temp16;
-
-#define GPIO2_LATCH_IN         0xfffe5800        // GPIO32-48 input register
-#define GPIO2_LATCH_OUT        0xfffe5802        // GPIO32-48 output register
-#define GPIO2_CNTL             0xfffe5804        // GPIO32-48 io config, 1=inp, 0= out
-
-#define GPIO0_LATCH_IN         0xfffe4800        // GPIO0-15 input register
-#define GPIO0_LATCH_OUT        0xfffe4802        // GPIO0-15 output register
-#define GPIO0_CNTL             0xfffe4804        // GPIO0-15 io config, 1=inp, 0= out
-
-    tm_return->cid=DRP_CALIB_WRITE;
-    tm_return->index = prim->u.tm_params.index;
-    tm_return->size = 0;
-
-
-    #if (ETM_PROTOCOL == 1)
-      tm_return->status = -ETM_OK;
-     #else
-      tm_return->status = E_OK;
-    #endif
-
-//#if (OP_L1_STANDALONE == 1)
-#if 0
-	  // Copy drp_sw_data_init into drp_sw_data_calib
-  strsize = sizeof(T_DRP_SW_DATA);
-  ptrsrc = (UINT8 *)(&drp_sw_data_init);
-  ptrdst = (UINT8 *)(&drp_sw_data_calib);
-
-    for(indx=0;indx < strsize;indx++)
-    *ptrdst++ = *ptrsrc++;
-#endif
-
-#if 0
-  // GPIO-47 is used for timing measurement.
-  // To enable GPIO - 47as an output, Bit 15 of GPIO2_CNTL = 0
-  ptr_gpio = (UINT16*)GPIO2_CNTL;
-  temp16 = *ptr_gpio;
-  temp16 &= ~(0x8000);
-  *ptr_gpio = temp16;
-
-  // GPIO47 = 1
-  ptr_gpio = (UINT16*)GPIO2_LATCH_OUT;
-  temp16 = *ptr_gpio;
-  temp16 |= 0x8000;
-  *ptr_gpio = temp16;
-#endif
-    switch (tm_return->index)
-    {
-      case DRP_DUMMY: //Do Nothing Test Purposes
-	  	break;
-
-      case DRP_READ_FROM_FLASH: // Force the Update of drp_sw_data_calib
-      {
-           // Call function to load data  sw from FFS to SRM TBD Use the new Function
-           error = drp_sw_data_calib_upload_from_ffs(&drp_sw_data_calib);
-
-       //    error = drp_copy_ref_sw_to_drpsrm( (unsigned char *) &drp_ref_sw);
-
-           error = drp_copy_sw_data_to_drpsrm(&drp_sw_data_calib);
-
-           if(error < 0)
-            {
-#if (ETM_PROTOCOL == 1)
-              tm_return->status = -ETM_FATAL;
-#else
-              tm_return->status = E_INVAL;
-#endif
-           }
-          else
-           {
-#if (ETM_PROTOCOL == 1)
-             tm_return->status = -ETM_OK;
-#else
-            tm_return->status = E_OK;
-#endif
-          	}
-
-        break;
-      }
-
-
-      case DRP_DCXO_CALIB:
-      {
-
-	  #if (DRP_FW_EXT==1) //pinghua change it as 1
-         band = GSM_BAND;
-	  if((g_pcb_config == RF_EU_DUALBAND) || (g_pcb_config == RF_EU_TRIBAND) || (g_pcb_config == RF_PCS1900_900_DUALBAND))
-           band = EGSM_BAND;
-
-	  error = drp_dcxo_calib(band, &drp_sw_data_calib);
-	  #else
-	  error = drp_dcxo_calib(GSM_BAND, &drp_sw_data_calib);
-	  #endif
-          if(error < 0)
-          {
-#if (ETM_PROTOCOL == 1)
-              tm_return->status = -ETM_FATAL;
-#else
-              tm_return->status = E_INVAL;
-#endif
-          }
-          else
-          {
-#if (ETM_PROTOCOL == 1)
-             tm_return->status = -ETM_OK;
-#else
-  	      tm_return->status = E_OK;
-#endif
-          }
-
-        break;
-      }
-
-
-      case DRP_TX_RX_COMMON:
-      {
-          error = drp_tx_rx_common_calib(&drp_sw_data_calib);
-
-          if(error < 0)
-          {
-#if (ETM_PROTOCOL == 1)
-              tm_return->status = -ETM_FATAL;
- #else
-              tm_return->status = E_INVAL;
-#endif
-          }
-          else
-          {
-#if (ETM_PROTOCOL == 1)
-             tm_return->status = -ETM_OK;
- #else
-  	      tm_return->status = E_OK;
- #endif
-          }
-        break;
-      }
-
-
-      case DRP_LNA_CFREQ:
-      {
-          error = drp_lna_cfreq_calib( (UWORD16) prim->u.tm_params.value, &drp_sw_data_calib);
-          if(error < 0)
-          {
-#if (ETM_PROTOCOL == 1)
-              tm_return->status = -ETM_FATAL;
-#else
-              tm_return->status = E_INVAL;
-#endif
-          }
-          else
-          {
-#if (ETM_PROTOCOL == 1)
-             tm_return->status = -ETM_OK;
-#else
-  	      tm_return->status = E_OK;
-#endif
-          }
-        break;
-      }
-
-
-      case DRP_IQMC:
-      {
-          error = drp_iqmc_calib(prim->u.tm_params.value, &drp_sw_data_calib);
-          if(error < 0)
-          {
-#if (ETM_PROTOCOL == 1)
-              tm_return->status = -ETM_FATAL;
-#else
-              tm_return->status = E_INVAL;
-#endif
-          }
-          else
-          {
-#if (ETM_PROTOCOL == 1)
-             tm_return->status = -ETM_OK;
-#else
-  	      tm_return->status = E_OK;
-#endif
-          }
-        break;
-      }
-
-
-      case DRP_MIXER_POLE:
-      {
-          error =drp_mixer_pole_calib(prim->u.tm_params.value, &drp_sw_data_calib);
-          if(error < 0)
-          {
-#if (ETM_PROTOCOL == 1)
-              tm_return->status = -ETM_FATAL;
-#else
-              tm_return->status = E_INVAL;
-#endif
-          }
-          else
-          {
-#if (ETM_PROTOCOL == 1)
-             tm_return->status = -ETM_OK;
-#else
-  	      tm_return->status = E_OK;
- #endif
-          }
-        break;
-      }
-
-      case DRP_SCF_POLE:
-      {
-          error = drp_scf_pole_calib(prim->u.tm_params.value, &drp_sw_data_calib);
-          if(error < 0)
-          {
-#if (ETM_PROTOCOL == 1)
-              tm_return->status = -ETM_FATAL;
-#else
-              tm_return->status = E_INVAL;
-#endif
-          }
-          else
-          {
-#if (ETM_PROTOCOL == 1)
-             tm_return->status = -ETM_OK;
- #else
-  	      tm_return->status = E_OK;
-#endif
-          }
-        break;
-      }
-
-
-      case DRP_AFE_GAIN_1:
-      {
-          error = drp_afe_gain_calib1 (prim->u.tm_params.value, &drp_sw_data_calib);
-          if(error < 0)
-          {
-#if (ETM_PROTOCOL == 1)
-              tm_return->status = -ETM_FATAL;
- #else
-              tm_return->status = E_INVAL;
-#endif
-          }
-          else
-          {
-#if (ETM_PROTOCOL == 1)
-             tm_return->status = -ETM_OK;
-#else
-  	      tm_return->status = E_OK;
-#endif
-          }
-        break;
-      }
-
-
-      case DRP_AFE_GAIN_2:
-      {
-          error = drp_afe_gain_calib2 (prim->u.tm_params.value, &drp_sw_data_calib);
-          if(error < 0)
-          {
- #if (ETM_PROTOCOL == 1)
-              tm_return->status = -ETM_FATAL;
- #else
-              tm_return->status = E_INVAL;
- #endif
-          }
-          else
-          {
- #if (ETM_PROTOCOL == 1)
-             tm_return->status = -ETM_OK;
-   #else //OP_L1_STANDALONE == 1
-  	      tm_return->status = E_OK;
-  #endif
-          }
-        break;
-      }
-
-
-
-   case DRP_WRITE_TO_FLASH:
-      {
-#if (OP_L1_STANDALONE ==0)
-           // Call function to load data  sw from FFS to SRM TBD Use the new Function
-           error = drp_sw_data_calib_upload_to_ffs(&drp_sw_data_calib);
-
-          // TBD the followign immediate error handling can be removed once the PS related FFS functionality is in.
-           if (error < 0)
-           {
-#if (ETM_PROTOCOL == 1)
-              tm_return->status = -ETM_NOSYS;
- #else
-  	      tm_return->status = E_NOSYS;//OMAPS00090550
- #endif
-             return;
-      	    }
-
- #else // OP_L1_STANDALONE
-
-          if(error < 0)
-          {
-#if (ETM_PROTOCOL == 1)
-              tm_return->status = -ETM_FATAL;
-  #else
-              tm_return->status = E_INVAL;
- #endif
-          }
-          else
-          {
-#if (ETM_PROTOCOL == 1)
-             tm_return->status = -ETM_OK;
-#else
-  	      tm_return->status = E_OK;
-#endif
-          }
-
-#endif //OP_L1_STANDALONE
-        break;
-      }
-
-      default:
-      {
-        // nothing to do now.
-      }
-    } // end switch
-#if 0
-  // GPIO47 = 1
-  ptr_gpio = (UINT16*)GPIO2_LATCH_OUT;
-  temp16 = *ptr_gpio;
-  temp16 &= ~(0x8000);
-  *ptr_gpio = temp16;
-#endif
-
-  }
-
-#endif //L1_DRP
-
-
-
 void l1tm_rx_param_read(T_TESTMODE_PRIM *prim, T_TM_RETURN *tm_return)
 {
   volatile UWORD16 value;
@@ -3287,57 +2848,6 @@
   }
 #endif // (CODE_VERSION != SIMULATION)
 
-#if (L1_TPU_DEV == 1)
-  /*******************************************************************
-  * l1tm_flexi_tpu_table_write
-  *
-  * DESCRIPTION: The function would be called by the switch case in the etm_rf.
-  *******************************************************************/
-  void  l1tm_flexi_tpu_table_write(T_TESTMODE_PRIM * prim, T_TM_RETURN * tm_return)
-  {
-    Cust_tm_flexi_tpu_table_write(tm_return,
-      prim->u.tm_table16.index,
-      prim->str_len_in_bytes - 1,    // subtract 8-bit index
-      prim->u.tm_table16.table);
-  }
-
-  /*******************************************************************
-  * l1tm_flexi_tpu_table_read
-  *
-  * DESCRIPTION: The function would be called by the switch case in the etm_rf.
-  *******************************************************************/
-  void l1tm_flexi_tpu_table_read (T_TESTMODE_PRIM *prim, T_TM_RETURN *tm_return)
-  {
-    Cust_tm_flexi_tpu_table_read(tm_return, prim->u.tm_table16.index);
-  }
-
-//Flexi ABB Delays
-/*******************************************************************
-  * l1tm_flexi_abb_write
-  *
-  * DESCRIPTION: The function would be called by the switch case in the etm_rf.
-  *******************************************************************/
-  void  l1tm_flexi_abb_write(T_TESTMODE_PRIM * prim, T_TM_RETURN * tm_return)
-  {
-    Cust_tm_flexi_abb_write(tm_return,
-      prim->u.tm_table16.index,
-      prim->str_len_in_bytes - 1,    // subtract 8-bit index
-      prim->u.tm_table16.table);
-  }
-
-  /*******************************************************************
-  * l1tm_flexi_abb_read
-  *
-  * DESCRIPTION: The function would be called by the switch case in the etm_rf.
-  *******************************************************************/
-  void l1tm_flexi_abb_read (T_TESTMODE_PRIM *prim, T_TM_RETURN *tm_return)
-  {
-    Cust_tm_flexi_abb_read(tm_return, prim->u.tm_table16.index);
-  }
-
-
-
- #endif // Flexible TPU
 
   /*------------------------------------------------------------------*/
   /* l1tm_PRBS1_generate()                                            */