view src/g23m-gprs/grlc/grlc_em.c @ 624:012028896cfb

FFS dev.c, Leonardo target: Fujitsu MB84VF5F5F4J2 #if 0'ed out The FFS code we got from TI/Openmoko had a stanza for "Fujitsu MB84VF5F5F4J2 stacked device", using a fake device ID code that would need to be patched manually into cfgffs.c (suppressing and overriding autodetection) and using an FFS base address in the nCS2 bank, indicating that this FFS config was probably meant for the MCP version of Leonardo which allows for 16 MiB flash with a second bank on nCS2. We previously had this FFS config stanza conditionalized under CONFIG_TARGET_LEONARDO because the base address contained therein is invalid for other targets, but now that we actually have a Leonardo build target in FC Magnetite, I realize that the better approach is to #if 0 out this stanza altogether: it is already non-functional because it uses a fake device ID code, thus it is does not add support for more Leonardo board variants, instead it is just noise.
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 22 Dec 2019 21:24:29 +0000
parents 219afcfc6250
children
line wrap: on
line source

/*+-----------------------------------------------------------------------------
|  Copyright 2002 Texas Instruments Berlin, AG
|                 All rights reserved.
|
|                 This file is confidential and a trade secret of Texas
|                 Instruments Berlin, AG
|                 The receipt of or possession of this file does not convey
|                 any rights to reproduce or disclose its contents or to
|                 manufacture, use, or sell anything it may describe, in
|                 whole, or in part, without the specific written consent of
|                 Texas Instruments Berlin, AG.
+-----------------------------------------------------------------------------
|  Purpose :  This Module defines the engineering mode (EM) device driver for the
|             G23 protocol stack. This driver is used to control all engineering
|             mode related functions.
+-----------------------------------------------------------------------------
*/

#ifndef GRLC_EM_C
#define GRLC_EM_C

#define ENTITY_GRLC

/*--------- INCLUDES -----*/
/* Maybee some include is missing but windows and target build works*/
#include <string.h>   /*definition of memset*/
#include "typedefs.h"

#include "vsi.h"
#include "gprs.h"

#include "gsm.h"
#include "custom.h"   /*set FF_EM_MODE compile switch for SIMULATION*/
#include "prim.h"
#include "message.h"

#include "grlc.h"
#include "grlc_em.h" 

#ifdef FF_EM_MODE
/*
+------------------------------------------------------------------------------
| Function    : grlc_em_pco_trace_req
| 
| Parameter   : *grlc_em_pco_trace_req (EM_PCO_TRACE_REQ )
|
| Result      : void
|
+------------------------------------------------------------------------------
This function traces the EM data at the PCO.
*/
GLOBAL void grlc_em_pco_trace_req    ( T_EM_PCO_TRACE_REQ    * em_pco_trace_req)
{
  TRACE_FUNCTION( "grlc_em_pco_trace_req" );

  if(em_pco_trace_req->pco_bitmap & EM_PCO_GRLC_INFO)
  {

    TRACE_EVENT_EM_P4("EM_GRLC_INFO_REQ: grlc_sta:%d tbf_mode:%d dl_tfi:%d dl_mac_mode:%d",
      grlc_data->tm.state,
      grlc_data->tbf_type,
      grlc_data->dl_tfi,
      grlc_data->downlink_tbf.mac_mode);

    TRACE_EVENT_EM_P5("EM_GRLC_INFO_REQ: ul_tfi:%d ul_mac_mode:%d ul_nb_blocks:%d ul_cv:%d ul_cs:%d",
      grlc_data->ul_tfi,
      grlc_data->uplink_tbf.mac_mode,
      grlc_data->ru.rlc_octet_cnt,
      grlc_data->ru.cv,
      grlc_data->ru.cs_type);
  }

  PFREE (em_pco_trace_req);

}/*grlc_em_pco_trace_req*/

/*
+------------------------------------------------------------------------------
| Function    : grlc_em_fmm_rlc_trans_info_req
| 
| Parameter   : *em_fmm_rlc_trans_info_req (EM_FMM_RLC_TRANS_INFO_REQ)
|
| Result      : void
|
+------------------------------------------------------------------------------
This function provides data needed for microtec fmm1251. It gives the actual status about RLC.
*/
GLOBAL void grlc_em_fmm_rlc_trans_info_req (T_EM_FMM_RLC_TRANS_INFO_REQ * em_fmm_rlc_trans_info_req)
{
 PFREE(em_fmm_rlc_trans_info_req);

 TRACE_FUNCTION( "grlc_em_fmm_rlc_trans_info_req" );
 
 #ifdef FF_WAP
 {
  PALLOC(em_fmm_rlc_trans_info_cnf, EM_FMM_RLC_TRANS_INFO_CNF);
  
  memset (em_fmm_rlc_trans_info_cnf, 0, sizeof (T_EM_FMM_RLC_TRANS_INFO_CNF));

  em_fmm_rlc_trans_info_cnf->rlc_num_retrans    =   grlc_data->tbf_ctrl[grlc_data->ul_index].ret_bsn;
  em_fmm_rlc_trans_info_cnf->rlc_num_trans      =   (grlc_data->tbf_ctrl[grlc_data->ul_index].cnt_ts) - (grlc_data->tbf_ctrl[grlc_data->ul_index].ret_bsn);
  em_fmm_rlc_trans_info_cnf->rlc_pdu_cnt        =   grlc_data->tbf_ctrl[grlc_data->ul_index].pdu_cnt;
  em_fmm_rlc_trans_info_cnf->rlc_start_fn       =   grlc_data->tbf_ctrl[grlc_data->ul_index].start_fn;
  em_fmm_rlc_trans_info_cnf->rlc_end_fn         =   grlc_data->tbf_ctrl[grlc_data->ul_index].end_fn;
  em_fmm_rlc_trans_info_cnf->rlc_tbc            =   grlc_data->ru.tbc;
  
/* TRACE_EVENT_P5("t:%d r:%d p:%d s:%d e:%d", em_fmm_rlc_trans_info_cnf->rlc_num_trans,
                em_fmm_rlc_trans_info_cnf->rlc_num_retrans, em_fmm_rlc_trans_info_cnf->rlc_pdu_cnt,
                em_fmm_rlc_trans_info_cnf->rlc_start_fn, em_fmm_rlc_trans_info_cnf->rlc_end_fn);*/

  PSEND(hCommWAP, em_fmm_rlc_trans_info_cnf);
 }

#endif /*FF_WAP*/

}

/*
+------------------------------------------------------------------------------
| Function    : grlc_em_grlc_info_req
| 
| Parameter   : *em_grlc_info_req (T_EM_GLRC_INFO_REQ)
|
| Result      : void
|
+------------------------------------------------------------------------------
*/
GLOBAL void grlc_em_grlc_info_req (T_EM_GRLC_INFO_REQ * em_grlc_info_req)
{
  PALLOC (em_grlc_info_cnf, EM_GRLC_INFO_CNF);

  TRACE_FUNCTION( "grlc_em_grlc_info_req" ); 

  PFREE  (em_grlc_info_req);

  memset (em_grlc_info_cnf, 0, sizeof (T_EM_GRLC_INFO_CNF));

  em_grlc_info_cnf->grlc_state    =   grlc_data->tm.state;
  em_grlc_info_cnf->tbf_mod       =   grlc_data->tbf_type;
  /* ul tbf*/
  em_grlc_info_cnf->ul_tbf_par.tfi        =   grlc_data->ul_tfi;
  em_grlc_info_cnf->ul_tbf_par.mac_mod    =   grlc_data->uplink_tbf.mac_mode;
  em_grlc_info_cnf->ul_tbf_par.ul_nb_block=   grlc_data->ru.rlc_octet_cnt;
  em_grlc_info_cnf->ul_tbf_par.cv         =   grlc_data->ru.cv;
  em_grlc_info_cnf->ul_tbf_par.cs         =   grlc_data->ru.cs_type;
  /* dl tbf*/
  em_grlc_info_cnf->dl_tbf_par.tfi        =   grlc_data->dl_tfi;
  em_grlc_info_cnf->dl_tbf_par.mac_mod    =   grlc_data->downlink_tbf.mac_mode;

  PSEND(hCommGMM, em_grlc_info_cnf);
} /*grlc_em_grlc_info_req*/

#endif /* FF_EM_MODE */
#endif /* GRLC_EM_C */