changeset 141:99caa1978401

l1_sync.c: L1_RF_KBD_FIX ugliness cut out
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sun, 15 May 2016 02:21:37 +0000
parents cc68be0c4b80
children 60a142a16d6b
files chipsetsw/layer1/cfile/l1_sync.c
diffstat 1 files changed, 0 insertions(+), 143 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/cfile/l1_sync.c	Sun May 15 02:15:32 2016 +0000
+++ b/chipsetsw/layer1/cfile/l1_sync.c	Sun May 15 02:21:37 2016 +0000
@@ -538,46 +538,6 @@
 
 void l1s_synch()
 {
-
-   #if(L1_RF_KBD_FIX == 1)
-	static int prev_correction_ratio = 0; //omaps00090550
-
-        // Ratio Computation - Rounding Up to the Higher Integer if applicable
-
-    if (l1s.total_kbd_on_time !=0)
-        l1s.correction_ratio = ((FRAME_DURATION+((l1s.total_kbd_on_time-1)/2))/l1s.total_kbd_on_time);
-
-
-	    // Fix to change the Debounce Time value to 16 ms during Initial FB search
-    if ((l1a_l1s_com.mode == CS_MODE0)||(l1a_l1s_com.mode == CS_MODE))
-	{
-        l1s.correction_ratio = 4;
-        kpd_timer_modify(l1s.correction_ratio, l1s.actual_time.fn_mod42432);
-
-        #if (TRACE_TYPE == 1) || (TRACE_TYPE == 4)
-           l1_trace_correction_ratio(l1s.correction_ratio);
-        #endif
-	    prev_correction_ratio=4;
-    }
-    else
-	{
-        if(prev_correction_ratio != l1s.correction_ratio)
-		{
-  	       kpd_timer_modify(l1s.correction_ratio, l1s.actual_time.fn_mod42432);
-
-           #if (TRACE_TYPE == 1) || (TRACE_TYPE == 4)
-	       l1_trace_correction_ratio(l1s.correction_ratio);
-           #endif
-           prev_correction_ratio = l1s.correction_ratio;
-		}
-        else
-		{
-	       kpd_state_probe(l1s.actual_time.fn_mod42432);
-		}
-	}
-    l1s.total_kbd_on_time = FRAME_DURATION;
-	#endif
-
    #if (CODE_VERSION==SIMULATION)
       // increment time counter used for debug and by L3 scenario...
       l1s.debug_time ++;
@@ -8524,109 +8484,6 @@
 #endif // MOVE_IN_INTERNAL_RAM
 
 
-/* Added temporirly for RF_KEypad build */
-#if (L1_RF_KBD_FIX == 1)
-
-#if(OP_L1_STANDALONE == 1)
-
-/* Modify the KPD timer values */
-void kpd_timer_modify(UWORD8 ratio,UWORD32 frameNumber)
-{
-  UWORD32 debounce_time, long_key_time, timeout_time, temp_count, local_ratio;
-  WORD32 ptv_value;
-  UWORD16 keypad_state;
-
-  keypad_state = ((*(volatile UINT16*) KBR_STATE_MACHINE_STATUS) & 0x0f);
-
-  debounce_time = (*(volatile UINT16*) KBR_DEBOUNCING_TIME) & 0x3f;
-  local_ratio = KPD_DEBOUNCING_TIME / debounce_time;
-
-  if( keypad_state == 2 || keypad_state == 3 || keypad_state == 4)
-  {
-	ptv_value = KPD_CLOCK_DIVIDER;
-
-	if( ratio > 1)
-	{
-	    if( ratio % 2)
-     	    {
-         	ratio += 1;
-     	    }
-     	    if( !ratio )
-		ratio = 2;
-
-     	    for(temp_count = 0; ratio > 1 && temp_count < 7; temp_count++)
-     	    {
-		ratio /= 2;
-     	    }
-
-	    ptv_value -= temp_count;
-	}
-
-	if( local_ratio > 1)
-	{
-		if( ratio % 2)
-     		{
-         		ratio += 1;
-     		}
-     		if( !ratio )
-			ratio = 2;
-
-     		for(temp_count = 0; ratio > 1 && temp_count < 7; temp_count++)
-     		{
-			ratio /= 2;
-     		}
-
-		ptv_value += temp_count;
-	}
-
-	if( ptv_value < 0)
-		ptv_value = 0;
-
-	/* Change the PTV value */
-     	SetGroupBits16(*(volatile unsigned short *)(KBR_CTRL_REG), 2, 3, ptv_value);
-  }
-  else
-  {
-
-	debounce_time = ((*(volatile UINT16*) KBR_DEBOUNCING_TIME) & 0x3f) * local_ratio;
-  	long_key_time = ((*(volatile UINT16*)KBR_LONG_KEY_TIME) & 0xfff) * local_ratio;
-  	timeout_time = (*(volatile UINT16*) KBR_TIME_OUT) * local_ratio;
-//	kpd_env_ctrl_blk->long_time *= local_ratio;
-//        kpd_env_ctrl_blk->repeat_time *= local_ratio;
-        ptv_value = ((*(volatile UINT16*) KBR_CTRL_REG) &  0x1c) >> 2;
-
-	if( ptv_value != KPD_CLOCK_DIVIDER)
-	{
-		/* Change the PTV value */
-     		SetGroupBits16(*(volatile unsigned short *)(KBR_CTRL_REG), 2, 3, KPD_CLOCK_DIVIDER);
-	}
-
-	if( ratio > 0 )
-	{
-		(*(volatile UINT16*) KBR_DEBOUNCING_TIME) = debounce_time / ratio;
-		(*(volatile UINT16*) KBR_LONG_KEY_TIME) = long_key_time / ratio;
-		(*(volatile UINT16*)KBR_TIME_OUT) = timeout_time / ratio;
-//		kpd_env_ctrl_blk->long_time /= ratio;
-//		kpd_env_ctrl_blk->repeat_time /= ratio;
-	}
-  }
-
-}
-
-
-void kpd_state_probe(UWORD32 frameNumber)
-{
-	// not used in stand alone
-}
-
-#endif
-
-#endif/* #if (L1_RF_KBD_FIX == 1) */
-
-/* Added temporirly for RF_KEypad build */
-
-
-
 //This function calculates and returns the number of PM to scheduled during page block monitor
 UWORD8 calc_num_pm_to_report()
 {