# HG changeset patch # User Michael Spacefalcon # Date 1384635306 0 # Node ID 3c850b416c9a8efc9cd187d45b40b9cc4404f792 # Parent 971e84124a6f1f6fd98ed7c8534698f77abe852d integrating more L1 header files needed by the abb+spi code diff -r 971e84124a6f -r 3c850b416c9a gsm-fw/L1/dyn_dwl_include/l1_dyn_dwl_const.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gsm-fw/L1/dyn_dwl_include/l1_dyn_dwl_const.h Sat Nov 16 20:55:06 2013 +0000 @@ -0,0 +1,56 @@ +/************* Revision Controle System Header ************* + * GSM Layer 1 software + * L1_DYN_DWL_CONST.H + * + * Filename l1_dyn_dwl_const.h.h + * Copyright 2004 (C) Texas Instruments + * + ************* Revision Controle System Header *************/ +#if (L1_DYN_DSP_DWNLD == 1) + +#ifndef _L1_DYN_DWL_CONST_H_ +#define _L1_DYN_DWL_CONST_H_ + +/* DSP dynamic download background task id */ +#define C_BGD_DSP_DYN_DWNLD 9 + +#define RED 1 +#define GREEN 0 +#define MAX_NUM_OF_PATCH_IDS 5 +#define MAX_NUM_OF_STATE_MACHINES_IMPACTED 6 + +#define NUM_OF_DYN_DWNLD_PRIMITIVES 6 + +#define NUM_WORDS_COPY_API 256 // even value mandatory +#define START_API_DWNLD_AREA 0x1808 // 0x1808 +#define SIZE_API_DWNLD_AREA 0x7F8 // 0x800 +#define START_API_DWNLD_AREA_DURING_E2 0x10C1 // 0x10BE +#define SIZE_API_DWNLD_AREA_DURING_E2 0x15B // 0x410 +#define MCU_API_BASE_ADDRESS 0xFFD00000L +#define DSP_API_BASE_ADDRESS 0x800 + + +/* Dynamic Download API base address */ +#define C_DYN_DWNLD_API_BASE_ADDRESS 0x17F6 +#define HEADER_PATCH_SIZE 4 + +#if(CODE_VERSION == SIMULATION) + #define CRC_SIMU_OK 0xCAFE + #define SIZE_DWNLD_AREA_SIMU 2048 +#endif + +#define TRUE 1 +#define FALSE 0 + + +/* Define commands MCU/DSP*/ +#define C_DWL_DOWNLOAD_CTRL_DSP_ACK 0 +#define C_DWL_DOWNLOAD_CTRL_DOWNLOAD 1 +#define C_DWL_DOWNLOAD_CTRL_INSTALL 2 +#define C_DWL_DOWNLOAD_CTRL_UNINSTALL 3 +#define C_DWL_DOWNLOAD_CTRL_ABORT 4 +#define C_DWL_DOWNLOAD_CTRL_INIT 5 +#define C_DWL_ERR_RESET 0 + +#endif // _L1_DYN_DWL_CONST_H_ +#endif // L1_DYN_DSP_DWNLD diff -r 971e84124a6f -r 3c850b416c9a gsm-fw/L1/dyn_dwl_include/l1_dyn_dwl_defty.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gsm-fw/L1/dyn_dwl_include/l1_dyn_dwl_defty.h Sat Nov 16 20:55:06 2013 +0000 @@ -0,0 +1,131 @@ +/************* Revision Controle System Header ************* + * GSM Layer 1 software + * L1_DYN_DWL_DEFTY.H + * + * Filename l1_dyn_dwl_defty.h + * Copyright 2004 (C) Texas Instruments + * + ************* Revision Controle System Header *************/ +#if(L1_DYN_DSP_DWNLD==1) + +#ifndef _L1_DYN_DWL_DEFTY_H_ +#define _L1_DYN_DWL_DEFTY_H_ + +#include "l1_dyn_dwl_const.h" + +/***************************************************************************************/ +/* Dynamic download L1A structure to store dynamic download L1A global variables */ +/***************************************************************************************/ +typedef struct +{ + UWORD32 signal_code_vect[MAX_NUM_OF_PATCH_IDS]; + UWORD32 num_of_elem; +}T_FIFO_DYN_DWNLD ; +typedef struct +{ + UWORD8 state; + UWORD16 num_patches_installed; + UWORD16 patch_id[MAX_NUM_OF_PATCH_IDS]; + UWORD16 num_of_elem_to_copy; + UWORD16 next_patch_id[MAX_NUM_OF_PATCH_IDS]; + BOOL semaphore_vect[MAX_NUM_OF_STATE_MACHINES_IMPACTED]; + BOOL melody0_E2_flag_activated; + BOOL melody1_E2_flag_activated; + UWORD16 dsp_trace_level_copy; + BOOL trace_flag_blocked; + UWORD16 num_of_primitives; + BOOL dedicated_stop_flag; + T_FIFO_DYN_DWNLD waiting_patch_fifo; +}T_L1A_DYN_DWNLD_GLOBAL; + +/***************************************************************************************/ +/* Dynamic DSP L1A-L1S structure... */ +/***************************************************************************************/ +typedef struct +{ + BOOL start; + BOOL stop; +} T_DYN_DWNLD_TASK_COMMAND; + +/***************************************************************************************/ +/* Dynamic DSP download HISR - L1A structure... */ +/***************************************************************************************/ +typedef struct +{ + BOOL restart; +} T_DYN_DWNLD_HISR_COMMAND; + +typedef struct +{ + UWORD16 num_of_elem; + UWORD32 address[MAX_NUM_OF_PATCH_IDS]; +} T_DYN_DWNLD_HISR_UN_PARAM; + +typedef struct +{ + UWORD32 start_MCU_copy_address[MAX_NUM_OF_PATCH_IDS]; + UWORD16 size_of_dwnld_area; + UWORD16 start_of_dwnld_area; + UWORD16 num_of_elem; + UWORD32 address_to_install[MAX_NUM_OF_PATCH_IDS]; + UWORD16 crc[MAX_NUM_OF_PATCH_IDS]; + UWORD16 size_array[MAX_NUM_OF_PATCH_IDS]; +}T_DYN_DWNLD_HISR_CPY_PARAM; + +typedef struct +{ + T_DYN_DWNLD_HISR_COMMAND command; + T_DYN_DWNLD_HISR_UN_PARAM uninstall_parameters; + T_DYN_DWNLD_HISR_CPY_PARAM copy_parameters; +} T_L1A_DYN_DWNLD_HISR_COM; + +/***************************************************************************************/ +/* Dynamic download HISR structure to store dynamic download HISR global variables */ +/***************************************************************************************/ + +typedef struct +{ + UWORD8 state; + BOOL running; + UWORD16 uninstall_counter; + UWORD16 patch_ids_counter; + UWORD32 running_source_pointer; + UWORD16 tmp_patch_size; +} T_L1_DYN_DWNLD_API_HISR; + +/***************************************************************************************/ +/* Dynamic Download MCU-DSP API */ +/***************************************************************************************/ +typedef struct +{ + API d_api_dwl_download_ctrl; + API d_api_dwl_error_code; + API d_api_dwl_function_address[2]; + API d_api_dwl_crc; + API d_api_dwl_size; + API d_api_dwl_write_pointer; +} T_DYN_DWNLD_MCU_DSP; + +typedef struct +{ + UWORD32 primitive; + UWORD16 msg_id; +}T_SIGNAL_PATCH; + +#define GPRS_PATCH 0 +#define AMR_SCH_PATCH 1 +#define TTY_PATCH 2 +#define AMR_MMS_PATCH 3 +#define E2_PATCH 4 + + +#define DEDI_STATE_MACHINE 0 +#define TTY_STATE_MACHINE 1 +#define E2_STATE_MACHINE 2 +#define VOICE_MEMO_AMR_SM 3 +#define VOICE_PLAY_AMR_SM 4 +#define SPEECH_RECO_SM 5 + +#endif // _L1_DYN_DWL_DEFTY_H_ +#endif // L1_DYN_DSP_DWNLD + diff -r 971e84124a6f -r 3c850b416c9a gsm-fw/L1/dyn_dwl_include/l1_dyn_dwl_error.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gsm-fw/L1/dyn_dwl_include/l1_dyn_dwl_error.h Sat Nov 16 20:55:06 2013 +0000 @@ -0,0 +1,23 @@ +/************* Revision Controle System Header ************* + * GSM Layer 1 software + * L1_DYN_DWL_ERROR.H + * + * Filename l1_dyn_dwl_error.h + * Copyright 2004 (C) Texas Instruments + * + ************* Revision Controle System Header *************/ +#if (L1_DYN_DSP_DWNLD == 1) + +#ifndef _L1_DYN_DWL_ERROR_H_ +#define _L1_DYN_DWL_ERROR_H_ + +#define C_DYN_DWL_ERR_NONE (0x0000) /* no error */ +#define C_DYN_DWL_ERR_WR_PTR (0x0001) /* write pointer is not correct */ +#define C_DYN_DWL_ERR_SIZE (0x0002) /* size is not correct */ +#define C_DYN_DWL_ERR_END_SECTION (0x0004) /* end word is not detected */ +#define C_DYN_DWL_ERR_UN_INSTALL (0x0008) /* installation or un-installation fail */ +#define C_DYN_DWL_ERR_NOT_ENDED (0x0010) /* new request received but download not finished */ + +#endif // _L1_DYN_DWL_ERROR_H_ +#endif // L1_DYN_DSP_DWNLD + diff -r 971e84124a6f -r 3c850b416c9a gsm-fw/L1/dyn_dwl_include/l1_dyn_dwl_msgty.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gsm-fw/L1/dyn_dwl_include/l1_dyn_dwl_msgty.h Sat Nov 16 20:55:06 2013 +0000 @@ -0,0 +1,20 @@ +/************* Revision Controle System Header ************* + * GSM Layer 1 software + * L1_DYN_DWL_MSGTY.H + * + * Filename l1_dyn_dwl_msgty.h + * Copyright 2004 (C) Texas Instruments + * + ************* Revision Controle System Header *************/ +#if (L1_DYN_DSP_DWNLD == 1) + +typedef struct +{ + UWORD16 patch_id; +}T_API_L1_CRC_NOT_OK; +typedef struct +{ + UWORD16 error; +}T_API_L1_DYN_DWNLD_STOP; + +#endif // L1_DYN_DSP_DWNLD == 1 diff -r 971e84124a6f -r 3c850b416c9a gsm-fw/L1/dyn_dwl_include/l1_dyn_dwl_proto.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gsm-fw/L1/dyn_dwl_include/l1_dyn_dwl_proto.h Sat Nov 16 20:55:06 2013 +0000 @@ -0,0 +1,60 @@ +/************* Revision Controle System Header ************* + * GSM Layer 1 software + * L1_DYN_DWL_PROTO.H + * + * Filename l1_dyn_dwl_proto.h + * Copyright 2004 (C) Texas Instruments + * + ************* Revision Controle System Header *************/ + +#if (L1_DYN_DSP_DWNLD == 1) + +#ifndef _L1_DYN_DWL_PROTO_H_ +#define _L1_DYN_DWL_PROTO_H_ + +/* Functions declared in l1_dyn_dwl_apihisr.c */ +void l1_dyn_dwnld_apihisr(void); +BOOL l1_dyn_dwnld_apihisr_error_handler(void); +UWORD8 l1_dyn_dwnld_copy_patch_process (BOOL new_patch); + + +/* Functions declared in l1_dyn_dwl_afunc.c*/ +void l1_handle_particular_cases_for_TCS211(UWORD32 msg_code, BOOL *return_flag); +BOOL l1_does_the_incoming_primitive_trigger_dynamic_dwnld(UWORD32 msg_code, BOOL delay_flag); +UWORD16 l1_lookup_primitive_patch_matrix(UWORD32 msg_code, UWORD16* patch_id_p); +BOOL l1_is_patch_already_installed (UWORD16 patch_id); +BOOL l1_is_patch_id_in_uninstall_set (UWORD16 patch_id, UWORD16 *uninstall_patch_vect, UWORD16 num_of_uninstall_elem); +BOOL l1_manage_patch_incompatibilty(UWORD16 num_of_patch_id_to_dwnld, UWORD16 *num_of_uninstall_elem, UWORD16 *uninstall_patch_id_vect); +void l1_update_semaphores_for_all_state_machines(UWORD16 num_of_patch_id_to_dwnld); +void l1_set_semaphores_for_all_state_machines_involved(UWORD16 delay_num_patch, UWORD16* delay_patch_array); +void l1_reset_semaphores(); +void l1_disable_DSP_trace(); +void l1_enable_DSP_trace(); +BOOL l1_pop_Primitive(UWORD32 *p_primitive); +UWORD32 l1_check_Fifo_Primitive(); +BOOL l1_push_Primitive(UWORD32 primitive_id); + +/* Functions declared in l1_dyn_dwl_async.c */ +BOOL l1_dynamic_download_manager(UWORD32 SignalCode, BOOL delay_flag); + +/* Functions declared in l1_dyn_dwl_func.c*/ + +void l1_set_uninstall_parameters(void); +BOOL l1_set_dyn_dwnld_install_vect(UWORD16* size_p, UWORD32* dest_addr, UWORD16* crc_vect, const UWORD8 *patch_array_code, UWORD16 i); +UWORD16 l1_initialize_patch_parameters(); +void l1_initialize_pointers_for_copy(UWORD16 **pp_dest_mcu, UWORD16 **pp_src_mcu); +void l1_copy_till_the_end_of_the_patch_and_update_write_pointer(UWORD16 tmp_patch_size, UWORD16* p_dest_mcu, UWORD16* p_src_mcu); +void l1_copy_till_end_of_dwnld_area_and_update_write_pointer(UWORD16 tmp_dwnld_area_size,UWORD16 *p_dest_mcu, UWORD16 *p_tmp_patch_size, UWORD16 **pp_src_mcu); +BOOL l1_copy_first_N_words (UWORD16 *dwnld_area_size_p, UWORD16 *patch_area_size_p, UWORD16 **pp_dest_mcu, UWORD16 **pp_src_mcu); +UWORD16 l1_initialize_download_area_parameters(); +BOOL l1_init_pointers_and_copy_first_block_of_data(UWORD16 *dwnld_area_size_p, UWORD16 *patch_size_p, UWORD16 **pp_dest_mcu, UWORD16 **pp_src_mcu, BOOL new_patch); + +/* Functions declared in l1_dyn_dwl_init.c*/ + +void l1_dyn_dwnld_initialize_var(); +void l1_dyn_dwnld_reset(); +void l1_dyn_dwnld_reset_api(); + + +#endif // _L1_DYN_DWL_PROTO_H_ +#endif // L1_DYN_DSP_DWNLD diff -r 971e84124a6f -r 3c850b416c9a gsm-fw/L1/dyn_dwl_include/l1_dyn_dwl_signa.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gsm-fw/L1/dyn_dwl_include/l1_dyn_dwl_signa.h Sat Nov 16 20:55:06 2013 +0000 @@ -0,0 +1,30 @@ +/************* Revision Controle System Header ************* + * GSM Layer 1 software + * L1_DYN_DWL_SIGNA.H + * + * Filename l1_dyn_dwl_signa.h + * Copyright 2004 (C) Texas Instruments + * + ************* Revision Controle System Header *************/ +#if (L1_DYN_DSP_DWNLD == 1) + +#ifndef _L1_DYN_DWL_SIGNA_H_ +#define _L1_DYN_DWL_SIGNA_H_ + +#define P_DYN_DWNLD 0x41 + +// Messages L1S -> L1A +#define L1_DYN_DWNLD_STOP_CON ( ( P_DYN_DWNLD << 8 ) | 0x02 ) + +// Messages API HISR -> L1A // +#define API_L1_DYN_DWNLD_START_CON ( ( P_DYN_DWNLD << 8 ) | 0x03 ) +#define API_L1_DYN_DWNLD_FINISHED ( ( P_DYN_DWNLD << 8 ) | 0x04 ) +#define API_L1_DYN_DWNLD_STOP ( ( P_DYN_DWNLD << 8 ) | 0x05 ) +#define API_L1_CRC_NOT_OK ( ( P_DYN_DWNLD << 8 ) | 0x07 ) +#define API_L1_CRC_OK ( ( P_DYN_DWNLD << 8 ) | 0x08 ) +#define API_L1_DYN_DWNLD_UNINST_OK ( ( P_DYN_DWNLD << 8 ) | 0x09 ) + +#endif //_L1_DYN_DWL_SIGNA_H_ + +#endif // L1_DYN_DSP_DWNLD + diff -r 971e84124a6f -r 3c850b416c9a gsm-fw/L1/include/l1_confg.h --- a/gsm-fw/L1/include/l1_confg.h Sat Nov 16 19:41:30 2013 +0000 +++ b/gsm-fw/L1/include/l1_confg.h Sat Nov 16 20:55:06 2013 +0000 @@ -65,10 +65,12 @@ #define CODE_VERSION NOT_SIMULATION #define AMR 1 #define L1_12NEIGH 1 +#define L1_DYN_DSP_DWNLD 1 #define L1_EOTD 0 #define L1_GTT 0 #define MELODY_E2 1 #define TESTMODE 1 +#define TRACE_TYPE 4 #if CONFIG_GPRS # define L1_GPRS 1 diff -r 971e84124a6f -r 3c850b416c9a gsm-fw/bsp/abb+spi/abb.c --- a/gsm-fw/bsp/abb+spi/abb.c Sat Nov 16 19:41:30 2013 +0000 +++ b/gsm-fw/bsp/abb+spi/abb.c Sat Nov 16 20:55:06 2013 +0000 @@ -26,13 +26,8 @@ /* */ /**********************************************************************************/ -#include "l1sw.cfg" +#include "../../include/config.h" -#include "chipset.cfg" -#include "board.cfg" -#include "rf.cfg" -#include "swconfig.cfg" -#include "sys.cfg" #include "abb.h" #include "l1_macro.h" #include "l1_confg.h"