mirror from https://www.codeaurora.org/git/projects/hisense-ts7008/repository/
[huawei.git] / AMSS / tmc.c
1 /*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*\r
2 \r
3                             TASK MAIN CONTROLLER\r
4 \r
5 GENERAL DESCRIPTION\r
6   This module provides none protocol specific power up initialization, and\r
7   task related operations such as task define start, offline and stop.\r
8 \r
9 EXTERNALIZED FUNCTIONS\r
10 \r
11   Task Entrance\r
12     tmc_task\r
13 \r
14   TMC Tasks-Interface\r
15     tmc_task_start    Procedure for tasks to acknowledge start up from TMC.\r
16     tmc_task_ack      Procedure for task to acknowledge from TMC.\r
17     tmc_task_stop     Procedure for task to do task stop processing from TMC.\r
18     tmc_task_offline  Procedure for task to do task offline processing from\r
19                       MC.\r
20     tmc_cmd           Procedure to send a command to TMC from other tasks.\r
21     tmc_ack           Procedure to send acknowledge signal to TMC from other\r
22                       tasks.\r
23 \r
24 INITIALIZATION AND SEQUENCING REQUIREMENTS\r
25 \r
26   This task is the first task created in the DMSS.  It is created from\r
27   the main module (using the REX task initialization service) after boot\r
28   processing is completed.  No other tasks or drivers have been created\r
29   or started when this task is started.\r
30 \r
31 Copyright (c) 2002 - 2009 by QUALCOMM INCORPORATED.\r
32 All Rights Reserved.\r
33 \r
34 Export of this technology or software is regulated by the U.S. Government.\r
35 Diversion contrary to U.S. law prohibited.\r
36 \r
37 *====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/\r
38 \r
39 /*===========================================================================\r
40 \r
41                         EDIT HISTORY FOR MODULE\r
42 \r
43   This section contains comments describing changes made to the module.\r
44   Notice that changes are listed in reverse chronological order.\r
45 \r
46   $Header: //source/qcom/qct/core/pkg/2H09/halcyon_modem/rel/LA2.0/AMSS/products/7x30/core/debugtools/tmc/src/tmc.c#2 $\r
47 \r
48 when       who     what, where, why\r
49 --------   ---     ----------------------------------------------------------\r
50 07/08/10   rsb     Added call to mobile_init_modem_sw_build_id\r
51 07/30/09   rbo     Added WLAN DS task\r
52 07/02/09   va      Added TCXO Manager Task\r
53 05/26/09   st      Added GFX task\r
54 05/27/09   wd      Added FEATURE_COREIMG and fix incorrect FEATURIZATINON\r
55 01/23/09   taw     Remove the reference to SLEEP_MP4_OKTS_SIG.\r
56 03/12/09   vas     Added entries for IPAUKCC_IPC\r
57 02/02/09   jwh     Added TMC_CMD_TYPE_RESET_MODEM \r
58 11/11/08   ry      Removed FEATURE_SENSORS.\r
59 10/28/08   jwh     Changed smsm_init() per updated SMEM APIs.\r
60 06/30/08   apu     Added support for FEATURE_VBATT_TASK. \r
61 05/29/08   gfr     Added MPP4 configuration for WLAN (from Evgeni Diment).\r
62 05/20/08   jac     Removed banned apis.\r
63 05/14/08   grl     Added FEATURE_TMC_WB_CACHE support.\r
64 05/14/08   gfr     Minor code cleanup and call clk_regime_init_nv instead of\r
65                    using global variables.\r
66 04/22/08   trc     First phase of 1x/HDR clock resource gating changes\r
67 03/18/08   gfr     Replace clk_regime_enable with resource manager.\r
68 02/28/08   cr/aar  Added PGI task.\r
69 01/21/08   gfr     Enable component services for WM.\r
70 12/12/07   ry      Updated the Sensors task to support FEATURE_ENHANCED_REX_TASK\r
71 12/13/07   gfr     Add SDC pmic MPP initialization.\r
72 12/10/07   jhs     Moved bus_init() and bus_monitor_init() to after\r
73                    clk_regime_init().\r
74 10/12/07   hwu     Added support for FEATURE_AMSS_RESTART.\r
75 10/01/07   gfr     Enable the USBH MPPs here until WM USBH driver does it.\r
76 09/26/07   gfr     Remove hack forcing phone online even when no NV is\r
77                    present.\r
78 09/20/07   gfr     Removed BREW code.\r
79 09/11/07   gfr     Support for time-of-day RTC offset and headset switch\r
80                    detection.\r
81 09/12/07   gfr     Support for UBM L1 task.\r
82 08/08/07   ah      Replaced defined(FEATURE_CGPS_PD_COMMS_TCP_ON_MODEM) with\r
83                    !defined(FEATURE_DATA_ON_APPS).\r
84 08/03/07   gfr     Do not initialize component services if the apps image\r
85                    is WinMobile.\r
86 07/18/07   gfr     Initialize component services.\r
87 07/10/07   gfr     Support for Quartz 1.3.6\r
88 06/18/07   ry      Added support for FEATURE_SENSORS\r
89 06/05/07   tbg     Added support for FEATURE_DLOAD_HW_RESET_DETECT.\r
90 06/04/07   mg      Add sleepctl_init() to initialize sleep controller driver.\r
91 05/22/07   gfr     Support for security tasks (Anuj Mundi).\r
92 05/09/07   gfr     Support for CPU Based Flow Control\r
93 05/08/07   gfr     Support for WLAN\r
94 05/04/07   gfr     Do not turn on graphics core at init.\r
95 04/27/07   gfr     HSU updates.\r
96 04/12/07   ptm     moved spin_lock initialization to smem\r
97 03/27/07   jfc     Reinstate rflib_init() for UMTS mode\r
98 03/06/07   gfr     Remove FEATURE_QVPHONE\r
99 03/01/07   gfr     Re-add the removal of 1x clocks since the change was\r
100                    incorrectly dropped in the last merge.\r
101 02/14/07   gfr     Remove obselete 1X clocks.\r
102 02/06/07   gfr     Change USBH_RST to USBH_CS1 and invert it.\r
103 02/05/07   gfr     Always call tlmm_init.\r
104 02/01/07   gfr     Reset HS_USB PHY as part of power-up sequence.\r
105 01/23/07   gfr     Featurize for 1X-only builds.\r
106 01/17/07   gfr     Support for new PMEM init functionality.\r
107 01/04/07   trc     Remove unnecessary SRCH4 MDSP registration\r
108 12/15/06   gfr     Fixes for WPLT.\r
109 11/22/06   gfr     Add FEATURE_DISABLE_CGPS.\r
110 11/22/06   gfr     Add WPLT task.\r
111 10/23/06   gfr     Remove flash_nand_init for new flash driver.\r
112 10/22/06   gfr     Remove msm_init.h\r
113 09/06/06   taw     Use smem_proc_comm API.\r
114 08/17/06   taw     Add a call to smem_init(); Change the call to smsm_init()\r
115                    to pass in no parameters.\r
116 08/15/06   taw     Include smem.h and set the modem status to TMCINIT in\r
117                    smem_proc_comm after TMC is initialized.\r
118 09/27/06   gb      Changes to get user set time working\r
119 09/01/06   kvk     Initializing USB for the Modem only configuration\r
120 08/30/06   kvk     Added support for Data on Apps\r
121 07/20/06   jhs     Add support for I2C on Apps.\r
122 07/17/06   sb      Added FEATURE_NO_USB_HW_ON_PROCESSOR for usb tasks\r
123 07/07/06   gfr     Deregister boot clock client when tmc_init is complete.\r
124 07/03/06   jhs     Cleaned up Bus Manager featurization.\r
125                    Added support for reading NV configuration for Bus\r
126                    Monitors.\r
127 06/20/06   dsn     Featurize BT for Modem, cleanup obsolete BT related tasks\r
128 05/11/06   ptm     Added call to process_init_callbacks for AMSS restart.\r
129 04/30/06   dlb     Added call to turn on recent_thread tracking.\r
130 04/26/06   ptm     Add OEMSBL release synchronization point for 7K.\r
131 03/29/06   ptm     Added init calls for spinlocks and smem logging for 7K.\r
132 03/24/06   pc      Added support for SECRND task\r
133 03/23/06   cl      Added PDSM_COMM_TASK\r
134 03/10/06   xz      Changed QVPHONE related code for 7500 support\r
135 01/25/06   ddh     Added DEM Task\r
136 01/24/06   ajn     Enabled GRAPHICS Clock regime\r
137 01/23/06   rlp     Added HID Support.\r
138 01/02/06   dle     Added FEATURE_CAMERA_DRV_TASK.\r
139 12/14/05   taw     Pmem is now initialized with the real modem heap in SMI.\r
140 11/10/05   pc      Added support for AVS_SBCENC_TASK\r
141 11/08/05   pc      Added support for GSM_PLT task\r
142 11/02/05   gw      Added support for GameMode.\r
143 10/26/05   ck      Fixed a compiler issue.\r
144 10/19/05   as      Fixed compiler warnings.\r
145 10/03/05   dd      Added L4 call to enable timetest.\r
146 08/01/05   vs      Added usbhost_api_init based on feature FEATURe_USB_HOST\r
147 08/26/05   pc      Added support for DISP_TASK.\r
148 08/20/05   pc      Renamed FEATURE_PROF_DIAG to FEATURE_PROFDIAG\r
149 08/15/05   hn      Replaced use of FS_FEATURE_RMTEFS_SERVER with FS_FEATURE_IG_IPC_SERVER\r
150 08/10/05   taw     Added a call to flash_nand_init() to init the flash driver\r
151                    and HW.  Added a call to pmem_init() to allow pmem use\r
152                    by the flash driver.\r
153 08/10/05   pc      Increased the wait_cnt for the UI task in tmc_stop_tasks()\r
154                    to 5s, for Sirius.\r
155 08/09/05   fl      Replaced file qvp_aud_eng.h with extern void qvp_ae_task()\r
156 08/05/05   jhs     Removed SMEM references.  Added SMD include file.\r
157 08/05/05   jhs     Removed SMEM references.  Added SMD include file.\r
158 08/03/05   pc      Replaced certain FEATURE_L4 with FEATURE_L4LINUX, added\r
159                    support for FEATURE_USB_HOST_API, included\r
160                    FEATURE_TCXOMGR_TMC.\r
161 08/01/05   vs      Added usbhost_api_init based on feature FEATURe_USB_HOST\r
162 07/19/05   taw     Added includes for flash functions and removed NANDC MPU\r
163                    usage for modem only builds.\r
164 07/18/05   et      added PARK MODE support\r
165 07/15/05   adm     Merged from mainline ver #23\r
166 07/13/05   adm     Merged in changes related to supporting BootLoader compilation\r
167                    for L4 builds\r
168 07/12/05   jz      Featureized QVP APP Task for Codec Only\r
169 07/12/05   grl     Added initialization of TRM for 1x targets.\r
170 06/20/05   fl      Replaced file sipt_task.h with extern void sipt_task()\r
171 06/17/05   fl      Replaced file qvp_encvfe.h with extern void qvp_vfe_task()\r
172 06/13/05   pc      Added support for WLAN sec task\r
173 06/13/05   sl      Sirius changes: Task Reordering; Secure clock API.\r
174 06/17/05   jhs     Removed time_tod_task.\r
175 06/07/05   jhs     Added pm_pwr_key_init for power key support.\r
176 06/01/05   grl     Removed srm/xrm initialization since they aren't used.\r
177 05/23/05   cep     Added aps_init for tmc_libraries_init_before_tasks_start\r
178 05/12/05   pc      Added call to time_set_from_pmic() to get the time from\r
179                    PMC RTC for Time Services.\r
180 05/02/05   ibm     Moved UI initialization past DS and GSDI for Sirius.\r
181 04/21/05   pc      Added support for FEATURE_MFLO\r
182 04/20/05   pc      Added support for FEATURE_QIPCALL\r
183 04/09/05   pc      Added support for CNV task\r
184 04/14/05   sr      Remove the featurization for adie_init call\r
185 05/19/05   lp      Removed HWIO PMIC_SSBI call that enables MDDI\r
186 05/18/05   ~SN     Removed clk_regime_msm_init() & clk_regime_msm_enable (CLKRGM_PRPH_CLK).\r
187 05/18/05   jhs     Added time_tod_task.\r
188 04/05/05   ddh     Replace OKTS MASK with OKTS SIG\r
189 03/28/05   sv      More Update Abnormal Exit count - Sirius specific change\r
190 03/21/05   sv      Update Abnormal Exit count - Sirius specific change\r
191 03/15/05   wal     Added APS task for L4/Linux under FEATURE_APS\r
192 03/15/05   adg     Added QDIAG task for L4/Linux under FEATURE_IG_QDIAG\r
193 03/15/05   jqi     Added support for FS_FEATURE_RMTEFS_SERVER, FEATURE_L4\r
194                    FEATURE_PM_SERVER,FEATURE_IG_UI_CLIENT_SELECT\r
195 03/07/05   lyr     Moved WLAN task startup before DS task startup\r
196 02/24/05 t_jarmis  Added FEATURE_FM for FM-RDS Radio.\r
197 02/14/05   jqi     Updated for FEATURE_BATTERY_CHARGER.\r
198 02/04/05   jqi     Fix the bug in the tmc processing stop/offline tasks.\r
199                    Revised the change for TMC vote for sleep.\r
200                    Send stop/offline signal to sleep task.\r
201 02/05/05   aku     Added support for WLAN Adapter initialization in TMC.\r
202 02/04/05   dwp     Added QVP support for SIP.\r
203 02/03/05   jqi     Added support for TMC vote for sleep.\r
204 02/03/05 eprice    Addition of Sirius specific tasks using define SIRIUS_PLATFORM\r
205 01/31/05   jqi     Added support for FEATURE_CC_MONITOR, FEATURE_FOTA_FS,\r
206                    FEATURE_ENABLE_FLOATING_POINT_ERRORS.\r
207 05/06/05   ptm     Moved dmov_init to before time_init to ensure it completes\r
208                    before apps dmov_init starts.\r
209 04/29/05   jc      Added PMIC support to enable MDDI power on SURF.\r
210 04/22/05   ptm     Moved smem and oncrpc tasks to top of task def routine.\r
211                    Moved timer sync code to the timer subsystem.\r
212 04/24/05   ~SN     Added FEATURE_BRINGUP_DIAG_ONLY\r
213 04/14/05   adm     Added smd task under FEATURE_SMD\r
214 03/24/05   jhs     Moved i2c_init above sio_init becuase USB uses I2C.\r
215 03/21/05   smkg    Update the function call to clk_regime_msm_init.\r
216 03/14/05   jhs     Added support for multiprocessor slow clock sync.  Again\r
217                    moved rdm_get_prev_ports and rdm_issue_opens as per\r
218                    comment 12/06/04, ptm.\r
219 01/28/04   ptm     Remove references to sta_remote_task and add feature\r
220                    protection around sta references.\r
221 01/21/05   ~sn     Added DMOV INIT\r
222 12/27/04    ro     Add offline and stop sigs for VOC, QDSP, QDSP_RTOS.\r
223 12/06/04   ptm     Moved the start up ONCRPC of to tmc_start_service_tasks and\r
224                    rdm_get_prev_ports and rdm_issue_opens up to\r
225                    tmc_libraries_init_after_service_tasks_start so that\r
226                    ONCRPC is ready to handle RPC calls before any of the\r
227                    application tasks are started.\r
228                    Moved #ifndef T_RUMI2_DIAG_ONLY around call to\r
229                    tmc_libraries_init_after_service_tasks_start into the\r
230                    routine so that only part of the routine is protected.\r
231 12/03/04    lp     Enabled QDSP task by removing T_RUMI_QDSP.  Fixed compile\r
232                    error when TIMETEST is defined.\r
233 11/24/04    cr     Add smem_boot_sync to release aARM to begin executing\r
234                    Reset_Handler.\r
235 11/08/04    ro     Added FEATURE_QDSP_RTOS - start ADSP RTOS Task\r
236 10/13/04   adm     Added smem task\r
237 01/25/05   jqi     Fixed constantly high sleep current issue.\r
238 01/21/05   ldaita  Added support MGPCC task (needed for GPS).\r
239 01/19/05   aar     Fixed compilation problem due to rex_def_task2 I/F mismatch.\r
240 01/14/05   rp      Added background loading in Progressive boot task support\r
241            jh      Added support for enabling profiling through diag interface.\r
242 01/12/05   jqi     Lint fixes.\r
243 01/06/05   aar     Added support for GPSSRCH demod task.\r
244 12/23/04   ty      Changed ran_seed() use to ran_init() to initialize seed\r
245 11/22/04   gfr     Suppress intlock profiling during init.\r
246 11/10/04   jz      Added QVP VFE Task\r
247 11/18/04   pa      Added support for PBM task.\r
248 11/02/04   jqi     Fixed compilation warning and featurization issue.\r
249                    updated comments.\r
250 10/22/04   jqi     Featurization fixes.\r
251 10/20/04   ajn     Added support for TIMER task.\r
252 10/15/04   rp      Added support for page and interrupt tasks.\r
253 10/08/04   jqi     Added support for FEATURE_HSDPA\r
254 09/29/04   ss      Added support for DTV (Digital TV) task\r
255 09/29/04   jqi     Fixed ADS1.2 and RVCT compilation warnings.\r
256 09/24/04   gfr     Rename feature\r
257 09/16/04   gfr     Added support for tcxo manager init and powerdown.\r
258 09/16/04   jqi     Added ftm_task.h file.\r
259 09/10/04   hl      Added support for joystick feature\r
260 08/25/04   jqi     Fixed compilation errors/warnings.\r
261 08/23/04   vr      Replaced include dsbcdb_api.h by dsbcdb_task.h\r
262 08/11/04   efy     Unified adie_init() interface.\r
263 08/05/04   ap      Moved UI task to stop last.\r
264 07/26/04   jqi     Added support to read GPS nv items during power up.\r
265 07/22/04   jqi     Added support for WPLT and GPLT.\r
266 07/13/04   ajn     Added initialization for SRM/XRM\r
267 07/09/04   jqi     Corrected the parameters for tmc_realloc() API.\r
268                    Added support for FEATURE_ADC_CALIBRATION.\r
269 06/24/04   jm      Used prototype directly for DRM task.\r
270 06/21/04   dc      Wrapped#include "acpwb.h" with FEATURE_ACP.\r
271 06/16/04   bd      Unconditional include "adie.h" regardless of\r
272                    FEATURE_WCDMA_PLT.\r
273 06/10/04   jqi     Updated the history comments.\r
274 06/09/04   jl      Featurized CLK_RGM_DFM_M regime enable function with\r
275                    FEATURE_ACP.\r
276 05/25/04   jqi     Fixed mode preference reset issue after power up.\r
277            et      Unified adie init interface for all the targets.\r
278 05/19/04   vr      Added support for BCDB and HDRBC tasks\r
279            jqi     TMC HEAP API.\r
280                    Bump up tlmm_init() before rflib_init().\r
281            ml      Added FEATURE_UI_CORE_REMOVED.\r
282 04/27/04   jqi     Back up the changes to rename time.h to time_svc.h.\r
283 04/23/04   jqi     Read Vbatt, therm and HW config during power up regardless\r
284                    of multimode RF feature.\r
285 04/07/04   tg      Added support for FEATURE_ERR_EXTENDED_STORE.\r
286                    Removed support for FEATURE_LOG_EXCEPTIONS_TO_NV.\r
287 04/06/04   jqi     Added FEATURE_BREW_PWRUP_INIT.\r
288 04/01/04   sg      removed support for LP task as task no longer exists.\r
289 03/15/04   tg      Added support for FEATURE_LOG_EXCEPTIONS_TO_NV.\r
290 03/12/04   st      Removed MSM6500 work around when creating MDSP task.\r
291 02/23/04   jqi     Fixed some typo in FEATURE_SEC_DRM.\r
292            bs      Added support for Bluetooth External Profiles feature support .\r
293 02/19/04   jqi     Fixed Lint error\r
294            ak      Added support for Brew 3.0.\r
295            Jm      Added support for FEATURE_SEC_DRM.\r
296 02/12/04   vd      Added support for FEATURE_GSM_CB.\r
297 02/09/04   ajn     Renamed time.h to time_svc.h to avoid OS conflict.\r
298                    Moved time_init() below tramp_init(), since it uses tramp.\r
299 02/06/04   et      Added support for DRM feature.\r
300 02/02/04   dd      Called adie_init after rflib_init and before voc task is\r
301                    started for 1x target.\r
302 01/19/04   jqi     Fixed compile warninigs.\r
303 12/03/03   bt      Move srch4 registration into\r
304                    tmc_libraries_init_after_service_tasks_start.\r
305 11/26/03   jqi     Remove update rf init status based on ftm nv flag.\r
306 11/20/03   jqi     Added support for SYS_OPRT_MODE_OFFLINE_IF_NOT_FTM.\r
307 11/19/03   jqi     Added support for FEATURE_ENHANCED_REX_TASK.\r
308 11/14/03   dd      Added support for GPS Search task.\r
309 11/12/03   dwp     Additional QVPHONE updates.\r
310 10/31/02    sr     QVPHONE changes merged for Saber. SBI API's rolled into RF\r
311                    VU's.\r
312 10/29/03   jqi     Consolidate MSM6200 target related features.\r
313 10/22/03   ts      re-organization in PDSM files.\r
314 10/17/03   jm      Fixed typo.\r
315 10/13/03   jqi     Fixed compile warning.\r
316 10/07/03   sa      CR30885-Add diag request to check the size of TMC heap\r
317 10/06/03   jqi     Fixed multimode RF enter mode issue.\r
318 09/29/03   dna     Get T_QUASAR to compile and work again for MSM6500\r
319 09/21/03   bt      Download SRCH4 App after all tasks have been started.\r
320 08/14/03   ht      Merged MSM6500 changes and QUASAR support.\r
321 07/21/03   xfg     Changed for Thin UI build and set lock to memory heap.\r
322 07/14/03   jqi     Swapped the tlmm_init() with sio_init().\r
323 07/09/03   cd      CR32650-Replace FEATURE_UIM_USIM withe FEATURE_UIM.\r
324 07/01/03   jqi     Added support for FEATURE_RESET_COUNTER.\r
325 06/19/03   ev      Added support for MSM6500 target for power up\r
326                    initialization.\r
327 06/12/03   rtp     Changed the FEATURE_DYNAMIC_CLOCK_FREQUENCY_CHANGING to\r
328                    FEATURE_AUTOMATIC_CLOCK_FREQUENCY_CHANGING\r
329 05/30/03   jqi     Renamed TIMETEST_SECIPS_TASK_ID to TIMETEST_SECIPSEC_TASK_ID.\r
330 05/29/03   jqi     CR28002\r
331                    Show task name which does not responds offline cmd in LCD.\r
332            Om      Added support for ARM_CRYPTO and IPSEC tasks,\r
333 05/28/03   TMR/dgy Added changes for WCDMA single-mode build.\r
334 05/14/03    ld     Added support for MGP related tasks\r
335 04/30/03   jqi     Added !FEATURE_MDSP_TASK around included file dmddown.h\r
336 04/26/03   jqi     Delete enable all clk regimes for leopard target.\r
337 04/25/03   ts      Swapped the tlmm_init with uim_dev_init().\r
338 04/23/03   rtp     Modified the code under\r
339                    FEATURE_DYNAMIC_CLOCK_FREQUENCY_CHANGING\r
340 04/22/03   jqi     Removed TMC heap to tmc_nzi.c.\r
341                    Added include file virtuim.h under FEATURE_VIRTUAL_SIM.\r
342 04/17/03   dgy     Used dsgcsd_task.h instead of dsgcsd.h.\r
343 04/16/03   jqi     Removed test_mc.h and used ftm.h for cougar,leopard,\r
344                    cheetah and saber targets.\r
345                    Removed T_RF_ZRF6200 feature around sbi_init().\r
346 04/14/03   jqi     Revised MM RF driver initialization for cougar.\r
347                    Only did once during power up in tmc.c and removed codes\r
348                    in mc.c\r
349 04/04/03   jqi     Moved stack profiling inside of tmc_define_tasks().\r
350            bd      Added WPLT support for PMIC\r
351            cd      Added uim_power_control() in power off and reset.\r
352 04/01/03   jqi     Rename TIMETEST_GCDS_TASK_ID to TIMETEST_GCSD_TASK_ID.\r
353 03/25/03   jqi     Increased GSTK,UIM,GSDI stop time out to 5 seconds.\r
354                    Added definition of tmc_get_mem_heap_size().\r
355 03/21/03   jqi     Removed technology features around adie_init().\r
356                    Moved stop UIM task aster GSDI and GSTK tasks.\r
357 03/14/03   jqi     Added FEATURE_MULTIMODE_ARCH around mmoc task.\r
358                    Added FEATURE_CM around sending cm offline command.\r
359 03/12/03   jqi     CR28464 - added tasks' name.\r
360 03/11/03   jqi     CR28438 - moved err_init() after nv_task starts.\r
361 03/05/03   jqi     If RF CAL is invalid and FTM flag is invalid,\r
362                    set ftm flag to true.\r
363                    Clearn up MMRF interface for Cougar, Leopard and Cheetah.\r
364 03/04/03   at      Changes to resolve naming conflict with MMGPS defined types\r
365                    in mmgps_types.h\r
366                    1. Replace nf.h, cd.h (pe.lib's internal include files) with pe_task.h\r
367                    2. Replace pb.h with pb_task.h\r
368 03/04/03    lz     Removed FEATURE_MOBILE_SUITE.\r
369 02/28/03   jqi     Set ftm mode default value amss_mode for cheetah (temporary fix)\r
370 02/27/03   jqi     Set ftm mode default value ftm_mode.\r
371 02/26/03   jqi     Without feature FEATURE_DIAG_COUPLED_ARCHITECTURE, diag no\r
372                    longer wait for complete signal during offline process.\r
373 02/21/03   jay     Added support for FEATURE_SEC_SSL.\r
374                    Clear task start signal in tmc_start_task().\r
375 02/19/03   sj      Added support for LPM.\r
376 02/19/03   jqi     Added support for FEATURE_DYNAMIC_CLOCK_FREQUENCY_CHANGING.\r
377 02/18/03   jqi/jar Added Generic SIM Tookit Task (FEATURE_GSTK) Support and\r
378                    Virtual Sim Application Toolkit (FEATURE_VIRTUAL_SAT) Task.\r
379 02/14/03   jqi     Added support for FTM task\r
380                    If nv ftm flag is set true, do not send offline command.\r
381                    Remove unfinished LPM support.\r
382                    Added support for FEATURE_MULTIMODE_APIRF.\r
383 02/07/03   jqi     Added support for LPM.(not finished yet)\r
384                    Added support for stack profiling.\r
385                    Expanded FEATUREs associated with GSDI task.\r
386 02/06/03   jqi     FTM support with all tasks start for UMTS target.\r
387                    Use chg_init(TRUE) for UMTS target.\r
388 01/29/03   jqi     Fixed a typo.\r
389 01/28/03   jqi     Called ftm_tmc_init() on behalf of FEATURE_FACTORY_TEST_MOE.\r
390 01/27/03   sj      Moved starting of UI/CM/MMOC etc tasks after initializing\r
391                    rf so that offline is the first command in the CM queue.\r
392 01/22/03    lz     Added support for FEATURE_MOBILE_SUITE.\r
393 01/21/03   jqi     Featurize the UMTS FTM change with T_RF_ZRF_6200\r
394                    Rename MC_RPT_TIMER_SIG with TMC_RPT_TIMER_SIG.\r
395                    Remove mc.h\r
396 01/20/03   jqi     Removed feature around rf_init() and rf_init_delayed().\r
397 01/15/03   jqi     Merged with MSM6200 TMC #68.\r
398                    1.added "clkrtc.h"\r
399                    2.New feature support\r
400                      FEATURE_VDSP_AT_48MHZ\r
401                    3.A temporary support for UMTS FTM: do not start all tasks\r
402                    Featurized the clk_regime_enable() for only 6300 target.\r
403 12/31/02   jqi     Merged with MSM6200 TMC #62.\r
404                    1.added tmc_heap_small.\r
405                    2.New feature support\r
406                      FEATURE_GSM_GPRS\r
407                      FEATURE_RF\r
408                      FEATURE_MVS\r
409                      FEATURE_UIM_USIM\r
410                      FEATURE_HS_DETECT_BASEBAND_TYPE\r
411                      FEATURE_PDAPI\r
412                      DEBUG_TEST_RF\r
413                    3.added support for FEATURE_WCDMA_PLT, FEATURE_GSM_PLT\r
414                    4.added support for FEATURE T_RF_ZRF6200 during power up HW initialication\r
415                    5.remove ftm_tmc_init to where ftm_mode is read.\r
416 12/09/02   jqi     Remove test_mc.h out of FEATURE_GSM.\r
417 12/05/02   jqi     Fixed compile errors.\r
418 12/04/02   jqi     Added support for multimode FTM.\r
419                    -Start all tasks in FTM mode.\r
420                    -use test_mc.h instead of ftm.h\r
421                    -add ftm_init in tmc_libraries_init_before_tasks_start();\r
422 11/06/02   jqi     Featurized the temporary fixes for MM combined builds.\r
423 11/05/02   jai     A temporary fixes for MM combined builds.\r
424                    - Removed adie_init(), rf_init, rf_init_delayed,\r
425                    - Added enable all clk regimes during Power up.\r
426 11/01/02   jqi     Added and featurized pm1000_init().\r
427 10/24/02   dle     Removed grp_init. It should only be called from disp_init.\r
428 10/21/02   jqi     Added support for FTM mode.\r
429 10/17/02   jqi     Remove bio_init on behalf of GSM feature.\r
430                    Added support for GSM FTM mode support.\r
431 10/15/02   jqi     Added support for GSM FTM mode support.\r
432 10/02/02   jqi     Use TIMETEST_TMC_TASK_ID for TMC task.\r
433                    Change TIMETEST_RR_TASK_ID to TIMETEST_GSM_RR_TASK_ID.\r
434                    Updated timetest.h and hp_stats.ini with missing TIMETEST task IDs.\r
435 09/27/02   jkl     Fixed featurization in ZIF libraries.\r
436            jqi     Added GSDI task in offline/stop handler.\r
437                    Featurized dog report code.\r
438                    Included WCDMA task header files.\r
439 09/26/02   dle     camera_init moved to graph_task.\r
440 09/26/02   jqi     Included target.h header file.\r
441 09/25/02   rmd     Moved pm init functions before adie init.\r
442            jqi     Used timed_wait for ack signal when sending offline/stop\r
443                    signals.Removed reset work around for cougar.\r
444 09/24/02   rmd     Added chg_init() with FEATURE_BATTERY_CHARGER.\r
445 09/18/02   jqi     Removed the redundant enc_init().\r
446 09/17/02   jqi     Fixed error when creating GCSD task.\r
447 09/17/02   hr      Added reset work around for cougar.\r
448 09/17/02   cyran   Complete the HWIO port such that MSM6000, MSM6050, and MSM6100\r
449 09/14/02   jqi     Removed custcmx.h.\r
450 09/13/02   jqi     Removed support for FTM mode.\r
451 09/10/02   jqi     Featurized HW related header files for unit test environment.\r
452                    Added support for camera and graph.\r
453 09/06/02   jqi     Change tmc_wait() return type to void to support MM RF.\r
454 09/06/02   jqi     Change gsdi_task_stack to gsdi_stack.\r
455 08/27/02   jqi     Added support for powerup init with FEATURE_MDSP_TASK.\r
456                    Require RF changes.\r
457                    Replaced GSDI feature with  FEATURE_MMGSDI.\r
458                    Replaced TMC_WMS with FEATURE_CDSMS || FEATURE_GWSMS.\r
459                    Moved read ESN ME to start service tasks.\r
460                    started wms task after ui task started.\r
461 08/21/02   jqi     Reverse the sequence of srch_util_demod_reset and\r
462                    demod_down_image.\r
463 08/19/02   jqi     Replace tempore uim feature with FEATURE_UIM.\r
464                    Treated GSM/WCDMA task as application tasks.\r
465                    Added support for timetest profile.\r
466                    Treated tlmm and I2C as generic HW.\r
467                    Reverse the sequence of srch_util_demod_reset and\r
468                    demod_download_image.\r
469                    Remove clkrgm_6050.h header file.\r
470 07/26/02   jqi     Featurize header files\r
471                    Used FEATURE_DATA_PS for ps task.\r
472                    Remove support for cdma.esn_me\r
473 07/25/02   jqi     Added temporary support for cdma.esn_me.\r
474                    Added support for MDSP task.\r
475 07/24/02   jqi     TMC reorganization.\r
476 07/09/02   jqi     Changes for code review.\r
477 07/02/02   jqi     Changes per 4th week of I&T\r
478 06/19/02   jqi     Added sending DIAG_OFFLINE_COMPLETE_SIG in the end of\r
479                    offline procedure.\r
480 06/14/02   jqi     Changes per 1st week of I&T.\r
481 06/06/02   jqi     Initial Release\r
482 \r
483 ===========================================================================*/\r
484 \r
485 /*===========================================================================\r
486 \r
487                      INCLUDE FILES FOR MODULE\r
488 \r
489 ===========================================================================*/\r
490 \r
491 #include "target.h"                                  /* Target header file */\r
492 #include "msg.h"                                    /* Message header file */\r
493 #include "err.h"                                      /* Error header file */\r
494 #include "customer.h"                       /* Customer configuration file */\r
495 #include "comdef.h"               /* Definition for basic types and macros */\r
496 \r
497 #include "tmcnv.h"                         /* TMC NV-Interface header file */\r
498 #include "tmc.h"                       /* Task Main Controller header file */\r
499 #include "tmci.h"              /* Task Main Controller interal header file */\r
500 #include "task.h"                                      /* Task header file */\r
501 \r
502 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
503 #include "tramp.h"                      /* Interrupt trampline header file */\r
504 #include "hw.h"                                    /* Hardware header file */\r
505 #include "gpio_int.h"                             /* GPIO Init header file */\r
506 #include "clk.h"                                      /* Clock header file */\r
507 #include "clkregim.h"                             /* CLK Regim header file */\r
508 \r
509 #include "sbi.h"\r
510 #ifdef FEATURE_I2C\r
511 #include "i2c.h"                                      /* I2C header file */\r
512 #endif /* FEATURE_I2C */\r
513 #include "ran.h"                                   /* random header file */\r
514 #ifdef FEATURE_PMIC_RTC\r
515 #include "clkrtc.h"    /* clk */\r
516 #endif\r
517 \r
518 #ifdef FEATURE_I2C_NPA\r
519 extern void i2c_npa_target_init(void);\r
520 #endif\r
521 \r
522 #if defined(FEATURE_MULTIMODE_RFAPI)\r
523 #include "rfm_ext.h"\r
524 #endif /* FEATURE_MULTIMODE_RFAPI */\r
525 \r
526 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
527 \r
528 #include "dog.h"                           /* Watch Dog Task header file */\r
529 \r
530 void dog_auto_register(void);\r
531 \r
532 #ifdef FEATURE_NV\r
533 #include "nv.h"                                        /* NV header file */\r
534 #endif /* FEATURE_NV */\r
535 \r
536 #ifdef FEATURE_CM\r
537 #include "cm.h"                                        /* CM header file */\r
538 #endif /* FEATURE_CM */\r
539 \r
540 #ifdef FEATURE_DIAG_TASK\r
541 #include "diag.h"                                    /* Diag header file */\r
542 #include "event.h"                                  /* Event header file */\r
543 #endif /* FEATURE_DIAG_TASK */\r
544 \r
545 #if defined(FEATURE_REX_CS)\r
546 /* BREW component services init function */\r
547 int initialize_component_services(void);\r
548 #ifdef __ARMCC_VERSION\r
549 __weak int initialize_component_services_modules(void);\r
550 #else\r
551 int initialize_component_services_modules(void);\r
552 #endif\r
553 #endif\r
554 \r
555 #if defined(FEATURE_UIM) || defined(FEATURE_UIM_RUIM)\r
556 #include "uim.h"\r
557 #endif\r
558 \r
559 #ifdef FEATURE_CTA\r
560 extern void cta_task (dword param);                  /* CTA task header file */\r
561 extern dog_report_type dyn_dog_cta_rpt;\r
562 #endif /* FEATURE_CTA */\r
563 \r
564 #if defined(FEATURE_UIM_RUIM)\r
565 #include "memory.h"\r
566 #include "nvruimi.h"                            /* UIM RUIM header files */\r
567 #endif /* FEATURE_UIM_RUIM */\r
568 \r
569 #ifdef TIMETEST\r
570 #include "timetest.h"\r
571 #include "l4/cust/msm_syscall.h"\r
572 #endif /* TIMETEST */\r
573 \r
574 #include "iguana/memsection.h"\r
575 #include "l4/misc.h"\r
576 \r
577 #if defined(FEATURE_SEC_TIME) && !defined(FEATURE_SEC_PROCESS_INIT)\r
578 #include "sectime.h"                  /* Secure time header file */\r
579 #endif /* FEATURE_SEC_TIME && !FEATURE_SEC_PROCESS_INIT */\r
580 \r
581 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
582 \r
583 #ifdef FEATURE_PMIC\r
584 #include "pm.h"                                        /* PM header file */\r
585 #endif\r
586 \r
587 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
588 \r
589 #ifdef FEATURE_GSM_PLT\r
590 #error code not present\r
591 #endif\r
592 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
593 \r
594 #include "err.h"\r
595 \r
596 #include "sd.h"\r
597 \r
598 #if defined(FEATURE_TMC_TCXOMGR) || defined(FEATURE_TCXOMGR_TMC)\r
599 #include "tcxomgr.h"\r
600 #endif\r
601 \r
602 #ifdef FEATURE_SMEM\r
603 #include "smem_pcmod.h"\r
604 #include "smem.h"\r
605 #ifdef FEATURE_SMSM\r
606 #include "smsm.h"\r
607 #endif /* FEATURE_SMSM */\r
608 #include "mobile.h"\r
609 #endif /* FEATURE_SMEM */\r
610 \r
611 #ifdef FEATURE_L4LINUX\r
612 #include "qids_smms.h"\r
613 #endif\r
614 \r
615 #if defined(FEATURE_BUSMON)\r
616 #error code not present\r
617 #endif /* FEATURE_BUSMON */\r
618 \r
619 #ifdef FEATURE_DAL\r
620 #include "DALSys.h"\r
621 #endif\r
622 \r
623 #if (defined(FEATURE_L4) && defined(FEATURE_STACKS_TCB_IN_WRITETHROUGH))\r
624 #include "iguana/memsection.h"\r
625 #include "l4/misc.h"\r
626 extern byte *Image__ZI_STACKS__Base;\r
627 extern byte *Image__UNINIT_RAM__Base;\r
628 #endif /*FEATURE_L4 && FEATURE_STACKS_TCB_IN_WRITETHROUGH*/\r
629 \r
630 #ifdef FEATURE_BATTERY_CHARGER\r
631 #include "charger.h"                              /* Charger header file */\r
632 #endif\r
633 \r
634 #include "memheap.h"                            /* Memory heap header file */\r
635 \r
636 /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\r
637 \r
638 /*===========================================================================\r
639 \r
640             GLOBAL DEFINITIONS AND DECLARATIONS\r
641 \r
642 This section contains global definitions for constants, macros, types,\r
643 variables\r
644 \r
645 ===========================================================================*/\r
646 \r
647 /*---------------------------------------------------------------------------\r
648                                   REX TIMER\r
649 ---------------------------------------------------------------------------*/\r
650 \r
651 static rex_timer_type tmc_rpt_timer;                                     /* Timer for kicking watchdog */\r
652 static rex_timer_type tmc_wait_timer;                                                         /* Timer for timer wait       */\r
653 \r
654 /*---------------------------------------------------------------------------\r
655                                     QUEUE\r
656 ---------------------------------------------------------------------------*/\r
657 \r
658 #define TMC_CMD_POOL_SIZE 10  /* Maximun number of command waiting in the queue */\r
659 \r
660 static tmc_cmd_type  tmc_cmd_arr[TMC_CMD_POOL_SIZE]; /* RAM command pool */\r
661 \r
662 static q_type tmc_free_cmd_q;             /* Queue to manage commands pool */\r
663 \r
664 static q_type tmc_cmd_q;\r
665 \r
666 /*---------------------------------------------------------------------------\r
667                                   STATE\r
668 ---------------------------------------------------------------------------*/\r
669 \r
670 typedef struct /* TMC data structure is defined to hold all internal used data.  */\r
671 {\r
672    tmc_state_e_type    state;                                              // TMC task state indicator - record current TMC task state.\r
673    dword               esn_me;                                             // ESN ME - read ESN ME from TMC-NV interface and store it here.\r
674    boolean             is_init_done;                                       // Inidcate tmc initialization is done or not.\r
675    rex_tcb_type        *ack_task_ptr;                                      // The task tcb who responses the ack signal to TMC.\r
676 \r
677 } tmc_data_s_type;\r
678 \r
679 static tmc_data_s_type tmc_data;\r
680 \r
681 typedef struct\r
682 {\r
683         rex_tcb_type                    handle;\r
684         rex_timer_cnt_type      count;\r
685 \r
686 } tmc_notify_s_type;\r
687 \r
688 /* Be ware of the risk in case the max number of task is over 100.\r
689 */\r
690 #define TMC_MAX_NUM_OF_TASK  100\r
691 \r
692 /* wait counter in milliseconds for waiting for acknowledge for\r
693 ** offline/stop signal from each tasks.\r
694 */\r
695 \r
696 #define TMC_DEFAULT_WAIT_CNT 50\r
697 #define TMC_WAIT_CNT_5SEC    5000\r
698 \r
699 /* Global variable used to turn write back cache off at run-time for\r
700 ** debugging. \r
701 */\r
702 static boolean tmc_write_back_cache_on = TRUE;\r
703 \r
704 /*===========================================================================\r
705 \r
706             LOCAL DEFINITIONS AND DECLARATIONS FOR MODULE\r
707 \r
708 This section contains local definitions for constants, macros, types,\r
709 variables and other items needed by this module.\r
710 \r
711 ===========================================================================*/\r
712 \r
713 #ifdef DOG_DYNAMIC_API   /* Dynamic Dog Interface */\r
714 #undef  DOG_TMC_RPT\r
715 #define DOG_TMC_RPT tmc_dog_rpt_var\r
716 dog_report_type tmc_dog_rpt_var = 0;      /* Initial Safety */\r
717 \r
718 #undef  DOG_TMC_RPT_TIME\r
719 #define DOG_TMC_RPT_TIME tmc_dog_rpt_time_var \r
720 uint32 tmc_dog_rpt_time_var = 0xffff; /* Initial Safety */\r
721 #endif   /* DOG_DYNAMIC_API  */\r
722 \r
723 /*===========================================================================\r
724 =============================================================================\r
725 ============================= MISCELLANEOUS BLOCK ===========================\r
726 ================================= FUNCTIONS =================================\r
727 =============================================================================\r
728 ===========================================================================*/\r
729 \r
730 #if defined(T_MSM7500) && defined(T_FFA) && !defined(FEATURE_I2C_DIRECT_ON_ARM11)\r
731 /*===========================================================================\r
732 \r
733 FUNCTION TMC_POWER_DOWN_USB_OTG\r
734 \r
735 DESCRIPTION\r
736   This function sends an I2C command to the USB OTG XCVR chip to put it in\r
737   power down mode to save current in sleep state.  Any future I2C command or\r
738   activity will power up the chip again.\r
739 \r
740 DEPENDENCIES\r
741   The I2C driver must be initialized.\r
742 \r
743 RETURN VALUE\r
744   None.\r
745 \r
746 SIDE EFFECTS\r
747   The USB OTG chip in the FFA will be in power down mode (power save mode).\r
748 \r
749 ===========================================================================*/\r
750 static void tmc_power_down_usb_otg(void)\r
751 {\r
752   i2c_rw_cmd_type   usb_xcvr_i2c_command;\r
753   uint8             i2c_data;\r
754 \r
755   /* Mode Control Register 2 - Addr: 0x12 */\r
756   /* Bit 0: global_pwr_dn - set to power down */\r
757   i2c_data = 0x01;\r
758   usb_xcvr_i2c_command.bus_id = I2C_BUS_HW_CTRL;\r
759   usb_xcvr_i2c_command.options = (i2c_options_type)(I2C_REG_DEV |\r
760                                                     I2C_START_BEFORE_READ);\r
761   usb_xcvr_i2c_command.slave_addr = 0x5A;\r
762   usb_xcvr_i2c_command.addr.reg = 0x12;\r
763   usb_xcvr_i2c_command.buf_ptr = &i2c_data;\r
764   usb_xcvr_i2c_command.len = 1;\r
765   i2c_write(&usb_xcvr_i2c_command);\r
766 } /* tmc_power_down_usb_otg */\r
767 #endif\r
768 \r
769 /*===========================================================================\r
770 \r
771 FUNCTION tmc_set_ack_task\r
772 \r
773 DESCRIPTION\r
774   Set task tcb pointer in tmc_data.\r
775 \r
776 DEPENDENCIES\r
777   None.\r
778 \r
779 RETURN VALUE\r
780   None.\r
781 \r
782 SIDE EFFECTS\r
783   None.\r
784 \r
785 ===========================================================================*/\r
786 static void tmc_set_ack_task(rex_tcb_type  *tcb_ptr)\r
787 {\r
788   tmc_data.ack_task_ptr = tcb_ptr;\r
789 } /* tmc_set_ack_task */\r
790 \r
791 /*===========================================================================\r
792 \r
793 FUNCTION tmc_is_ack_task\r
794 \r
795 DESCRIPTION\r
796   If the specified task tcb pointer is the same as that in tmc_data.\r
797 \r
798 DEPENDENCIES\r
799   None.\r
800 \r
801 RETURN VALUE\r
802   None.\r
803 \r
804 SIDE EFFECTS\r
805   None.\r
806 \r
807 ===========================================================================*/\r
808 static boolean tmc_is_ack_task(rex_tcb_type *tcb_ptr)\r
809 {\r
810   return (tmc_data.ack_task_ptr == tcb_ptr);\r
811 } /* tmc_is_ack_task */\r
812 \r
813 /*===========================================================================\r
814 \r
815 FUNCTION tmc_module_init\r
816 \r
817 DESCRIPTION\r
818   Initialize timers and queues of Task Main Controller\r
819 \r
820 DEPENDENCIES\r
821   None\r
822 \r
823 RETURN VALUE\r
824   void\r
825 \r
826 SIDE EFFECTS\r
827   None\r
828 \r
829 ===========================================================================*/\r
830 static void tmc_module_init(void)\r
831 {\r
832   unsigned int i;\r
833 \r
834   /* Initialize timers */\r
835    rex_def_timer(&tmc_rpt_timer, TASK_HANDLE(tmc), TMC_RPT_TIMER_SIG);\r
836    rex_def_timer(&tmc_wait_timer, TASK_HANDLE(tmc), TMC_WAIT_SIG);\r
837 \r
838   /* Initialize queues */\r
839   (void) q_init(&tmc_cmd_q);\r
840   (void) q_init(&tmc_free_cmd_q);\r
841 \r
842   /* Link and place each block in command pool into the free command queue.\r
843   ** Initalize command array.The done_q_ptr is for free command buffer back\r
844   ** to free command queue. If the task pointer is non-NULL, signal the task\r
845   ** that the tone is done.\r
846   */\r
847   for ( i=0; i< ARR_SIZE(tmc_cmd_arr); i++)\r
848   {\r
849     tmc_cmd_arr[i].cmd_id = TMC_CMD_TYPE_NONE;\r
850     tmc_cmd_arr[i].hdr.done_q_ptr = &tmc_free_cmd_q;\r
851     tmc_cmd_arr[i].hdr.task_ptr = NULL;\r
852     tmc_cmd_arr[i].hdr.sigs = 0;\r
853     (void) q_link(&tmc_cmd_arr[i],&tmc_cmd_arr[i].hdr.link);\r
854     q_put(&tmc_free_cmd_q, &tmc_cmd_arr[i].hdr.link);\r
855   }\r
856 } /* tmc_module_init */\r
857 \r
858 /*===========================================================================\r
859 \r
860 FUNCTION tmc_dog_report\r
861 \r
862 DESCRIPTION\r
863   Kick watch dog and set watch dog timer\r
864 \r
865 DEPENDENCIES\r
866   None\r
867 \r
868 RETURN VALUE\r
869   void\r
870 \r
871 SIDE EFFECTS\r
872   None\r
873 \r
874 ===========================================================================*/\r
875 \r
876 static void tmc_dog_report(void)\r
877 {\r
878         (void) rex_clr_sigs (TASK_HANDLE(tmc), TMC_RPT_TIMER_SIG);\r
879 \r
880 #ifdef FEATURE_DOG\r
881 \r
882         if (tmc_dog_rpt_time_var > 0) /* Zero means don't report */\r
883         {\r
884                 (void) rex_set_timer(&tmc_rpt_timer, tmc_dog_rpt_time_var);\r
885 \r
886                 dog_report(tmc_dog_rpt_var);\r
887         }\r
888 \r
889 #endif /* FEATURE_DOG */\r
890 \r
891 } /* tmc_dog_report */\r
892 \r
893 /*===========================================================================\r
894 \r
895 FUNCTION tmc_wait\r
896 \r
897 DESCRIPTION\r
898   Suspend TMC from executing until at least one of the specified signals\r
899   in the input mask is set.\r
900 \r
901   Note that this function keep reporting to the watchdog while waiting\r
902   for the signal(s) to be set.\r
903 \r
904 DEPENDENCIES\r
905   tmc_rpt_timer must have been defined with rex_def_timer().\r
906 \r
907 RETURN VALUE\r
908   rex_sigs_type\r
909 \r
910 SIDE EFFECTS\r
911   None\r
912 \r
913 ===========================================================================*/\r
914 static rex_sigs_type tmc_wait(rex_sigs_type mask)\r
915 {\r
916   rex_sigs_type    sigs;\r
917       /* Signals returned by rex_wait */\r
918 \r
919   /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
920 \r
921   /* Loop while waiting for one of the specified signals\r
922   ** to be set.\r
923   */\r
924   for( ;; )\r
925   {\r
926     /* Wait on specified signals, as well as,\r
927     ** on the watchdog signal.\r
928     */\r
929     sigs = rex_wait( mask | TMC_RPT_TIMER_SIG );\r
930 \r
931     /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
932 \r
933     /* If watchdog signal is set, report back to the watchdog\r
934     */\r
935     if( sigs & TMC_RPT_TIMER_SIG )\r
936     {\r
937       tmc_dog_report();\r
938     }\r
939 \r
940     /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
941 \r
942     /* If one or more of the specified signals is set\r
943     ** return now.\r
944     */\r
945     if( sigs & mask )\r
946     {\r
947          return(sigs);\r
948     }\r
949   } /* for ( ;; ) */\r
950 } /* tmc_wait */\r
951 \r
952 static void tmc_define_tasks_common(_TASK_INFO const* p_info, unsigned int dogval)\r
953 {\r
954    unsigned int i;\r
955 \r
956    TMC_MSG_MED("Creating task : %c%c%c.",\r
957             p_info->t_ident[0],\r
958             p_info->t_ident[1],\r
959             p_info->t_ident[2]);\r
960 \r
961    rex_def_task_ext2(p_info->t_handle,\r
962       (unsigned char *)p_info->t_stack, p_info->t_stksz * sizeof(rex_stack_word_type),\r
963       p_info->t_prio, p_info->t_main, TASK_ARGV_NIL, p_info->t_ident, FALSE, dogval);\r
964 \r
965    (void) tmc_wait(TMC_ACK_SIG);\r
966    (void) rex_clr_sigs(rex_self(), TMC_ACK_SIG);\r
967 }\r
968 \r
969 static void tmc_start_tasks_common(_TASK_INFO const* p_info)\r
970 {\r
971    TMC_MSG_MED("Starting task : %c%c%c.",\r
972             p_info->t_ident[0],\r
973             p_info->t_ident[1],\r
974             p_info->t_ident[2]);\r
975 \r
976     (void) rex_set_sigs(p_info->t_handle, TASK_START_SIG);\r
977 \r
978     (void) tmc_wait(TMC_ACK_SIG);\r
979     (void) rex_clr_sigs(rex_self(), TMC_ACK_SIG);\r
980   }\r
981 \r
982 /*===========================================================================\r
983 \r
984 FUNCTION tmc_get_cmd\r
985 \r
986 DESCRIPTION\r
987 This function dequeue a command from command queue and queue the memory\r
988 back to the free command queue\r
989 \r
990 DEPENDENCIES\r
991 Command queue has to be initialized.\r
992 \r
993 RETURN VALUE\r
994 A buffer of type tmc_cmd_type.\r
995 \r
996 SIDE EFFECTS\r
997   None\r
998 \r
999 ===========================================================================*/\r
1000 static tmc_cmd_type *tmc_get_cmd(void)\r
1001 {\r
1002    /* Dequeue a command from command queue */\r
1003    return(tmc_cmd_type *) q_get(&tmc_cmd_q);\r
1004 }                                                                          /* tmc_get_cmd */\r
1005 \r
1006 /*===========================================================================\r
1007 \r
1008 FUNCTION tmc_free_cmd\r
1009 \r
1010 DESCRIPTION\r
1011   This function returns a command buffer to the free queue.\r
1012 \r
1013 DEPENDENCIES\r
1014   Free queue has to be initialized.\r
1015 \r
1016 RETURN VALUE\r
1017   None\r
1018 \r
1019 SIDE EFFECTS\r
1020   None\r
1021 \r
1022 ===========================================================================*/\r
1023 static void tmc_free_cmd(tmc_cmd_type *cmd_ptr)\r
1024 {\r
1025   /* Enqueue a command into the free queue\r
1026   */\r
1027   if ( cmd_ptr != NULL )\r
1028   {\r
1029     /* Enqueue item onto done queue if requested (done_q_ptr != NULL)\r
1030     ** Do this before we signal the task so that it has its buffer back\r
1031     ** before we call its attention to the fact that the operation has\r
1032     ** completed.\r
1033     */\r
1034       if (cmd_ptr->hdr.done_q_ptr != NULL)\r
1035       {\r
1036       q_put( cmd_ptr->hdr.done_q_ptr, &cmd_ptr->hdr.link );\r
1037     }\r
1038 \r
1039     /* If the task pointer is non-NULL, signal the task that the tone is done.\r
1040     ** Note: The pointer was either passed as NULL, or was set to NULL because\r
1041     ** the signal was sent elsewhere.\r
1042     */\r
1043       if (cmd_ptr->hdr.task_ptr != NULL)\r
1044       {\r
1045       (void) rex_set_sigs( cmd_ptr->hdr.task_ptr, cmd_ptr->hdr.sigs );\r
1046     }\r
1047   }\r
1048 } /* tmc_free_cmd */\r
1049 \r
1050 /*===========================================================================\r
1051 \r
1052 FUNCTION tmc_offline_tasks\r
1053 \r
1054 DESCRIPTION\r
1055   The function sends the offline signal to tasks that need to be notified\r
1056   of offline. For each task it waits for the task to acknowledge the signal.\r
1057 \r
1058 DEPENDENCIES\r
1059   Task Main Controller has start.\r
1060 \r
1061 RETURN VALUE\r
1062   void\r
1063 \r
1064 SIDE EFFECTS\r
1065   None\r
1066 \r
1067 ===========================================================================*/\r
1068 static void tmc_offline_tasks(void)\r
1069 {\r
1070    rex_sigs_type        received_sigs;\r
1071    rex_tcb_type         *tcb_ptr[TMC_MAX_NUM_OF_TASK];\r
1072    int                  i=0,num_of_task;          /* number of task counter */\r
1073    /* the wait time counter in milliseconds */\r
1074    rex_timer_cnt_type   wait_cnt[TMC_MAX_NUM_OF_TASK];\r
1075 \r
1076 #ifdef TMC_SLEEP\r
1077    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1078    tcb_ptr[i++] = TASK_HANDLE(sleep);  /* Sleep task should received the offline signal as earlier as possible. */\r
1079 #endif /* TMC_SLEEP */\r
1080 #ifdef FEATURE_NV\r
1081    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1082    tcb_ptr[i++] = TASK_HANDLE(nv);\r
1083 #endif /* FEATURE_NV */\r
1084 #if !defined(FEATURE_THIN_UI) && !defined(FEATURE_UI_CORE_REMOVED)\r
1085 #ifdef FEATURE_HS\r
1086    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1087    tcb_ptr[i++] = TASK_HANDLE(hs);\r
1088 #endif /* FEATURE_HS */\r
1089 #endif /* !defined(FEATURE_THIN_UI) && !defined(FEATURE_UI_CORE_REMOVED) */\r
1090 #ifdef FEATURE_DIAG_TASK\r
1091    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1092    tcb_ptr[i++] = TASK_HANDLE(diag);\r
1093 #endif /* FEATURE_DIAG_TASK */\r
1094 #ifdef FEATURE_IG_QDIAG\r
1095    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1096    tcb_ptr[i++] = TASK_HANDLE(qdiag);\r
1097 #endif /* FEATURE_IG_QDIAG */\r
1098 #ifdef FEATURE_UI\r
1099       wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1100       tcb_ptr[i++] = TASK_HANDLE(ui);\r
1101 #endif /* FEATURE_UI */\r
1102 #ifdef FEATURE_CM\r
1103    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1104    tcb_ptr[i++] = TASK_HANDLE(cm);\r
1105 #endif /* FEATURE_CM */\r
1106 #ifdef FEATURE_SND_TASK\r
1107    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1108    tcb_ptr[i++] = TASK_HANDLE(snd);\r
1109 #endif /* FEATURE_SND_TASK */\r
1110 #ifdef FEATURE_VOC_TASK\r
1111    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1112    tcb_ptr[i++] = TASK_HANDLE(voc);\r
1113 #endif /* FEATURE_VOC_TASK */\r
1114 #ifdef FEATURE_QDSP_TASK\r
1115    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1116    tcb_ptr[i++] = TASK_HANDLE(qdsp);\r
1117 #endif /* FEATURE_QDSP_TASK */\r
1118 #ifdef FEATURE_QDSP_RTOS\r
1119    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1120    tcb_ptr[i++] = TASK_HANDLE(adsp_rtos);\r
1121 #endif /* FEATURE_QDSP_RTOS */\r
1122 #ifdef FEATURE_IS2000_TDSO\r
1123    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1124    tcb_ptr[i++] = TASK_HANDLE(tdso);\r
1125 #endif /* FEATURE_IS2000_TDSO */\r
1126 #ifdef FEATURE_HDR\r
1127    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1128    tcb_ptr[i++] = TASK_HANDLE(hdrsrch);\r
1129    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1130    tcb_ptr[i++] = TASK_HANDLE(hdrrx);\r
1131    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1132    tcb_ptr[i++] = TASK_HANDLE(hdrtx);\r
1133    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1134    tcb_ptr[i++] = TASK_HANDLE(hdrmc);\r
1135 #endif /* FEATURE_HDR */\r
1136 #ifdef FEATURE_HDR_BCMCS\r
1137    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1138    tcb_ptr[i++] = TASK_HANDLE(hdrbc);\r
1139 #endif /* FEATURE_HDR_BCMCS */\r
1140 #ifdef FEATURE_VBATT_TASK\r
1141    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT ;\r
1142    tcb_ptr[i++] = TASK_HANDLE(vbatt) ;\r
1143 #endif /* FEATURE_VBATT_TASK */\r
1144 #ifdef TMC_1X\r
1145    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1146    tcb_ptr[i++] = TASK_HANDLE(rxtx);\r
1147 #endif /* TMC_1X */\r
1148 #if defined(FEATURE_AUTH) || defined(FEATURE_RUIM)\r
1149    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1150    tcb_ptr[i++] = TASK_HANDLE(auth);\r
1151 #endif /* FEATURE_AUTH || FEATURE_RUIM */\r
1152 #ifdef FEATURE_DH\r
1153    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1154    tcb_ptr[i++] = TASK_HANDLE(dh);\r
1155 #endif /* FEATURE_DH */\r
1156 #ifdef FEATURE_DOG\r
1157    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1158    tcb_ptr[i++] = TASK_HANDLE(dog);\r
1159 #endif /* FEATURE_DOG */\r
1160 #if defined(FEATURE_CDSMS) || defined(FEATURE_GWSMS)\r
1161    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1162    tcb_ptr[i++] = TASK_HANDLE(wms);\r
1163 #endif /* FEATURE_CDSMS || FEATURE_GWSMS */\r
1164 #ifdef FEATURE_MDSP_TASK\r
1165    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1166    tcb_ptr[i++] = TASK_HANDLE(mdsp);\r
1167 #endif /* FEATURE_MDSP_TASK */\r
1168 #if defined(FEATURE_CGPS) && !defined(FEATURE_DISABLE_CGPS)\r
1169    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1170    tcb_ptr[i++] = TASK_HANDLE(mgpmc);\r
1171    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1172    tcb_ptr[i++] = TASK_HANDLE(pp);\r
1173    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1174    tcb_ptr[i++] = TASK_HANDLE(cc);\r
1175 #ifdef FEATURE_CGPS_PGI_TASK\r
1176    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1177    tcb_ptr[i++] = TASK_HANDLE(pgi);\r
1178 #endif /* FEATURE_CGPS_PGI_TASK */\r
1179    wait_cnt[i] = TMC_WAIT_CNT_5SEC;\r
1180    tcb_ptr[i++] = TASK_HANDLE(cd);\r
1181    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1182    tcb_ptr[i++] = TASK_HANDLE(nf);\r
1183    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1184    tcb_ptr[i++] = TASK_HANDLE(gpsfft);\r
1185    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1186    tcb_ptr[i++] = TASK_HANDLE(lm);\r
1187    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1188    tcb_ptr[i++] = TASK_HANDLE(sm_tm);\r
1189 #ifdef FEATURE_CGPS_PD_COMMS_TCP_ON_MODEM\r
1190    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1191    tcb_ptr[i++] = TASK_HANDLE(pdcommtcp);\r
1192 #endif /* !FEATURE_DATA_ON_APPS */\r
1193    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1194    tcb_ptr[i++] = TASK_HANDLE(pdcommwms);\r
1195    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1196    tcb_ptr[i++] = TASK_HANDLE(gps_fs);\r
1197 #ifdef FEATURE_CGPS_LOC_MIDDLEWARE\r
1198    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1199    tcb_ptr[i++] = TASK_HANDLE(loc_middleware);\r
1200 #endif // FEATURE_CGPS_LOC_MIDDLEWARE\r
1201 #endif /* FEATURE_CGPS */\r
1202 #ifdef FEATURE_XO\r
1203    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1204    tcb_ptr[i++] = TASK_HANDLE(tcxomgr);\r
1205 #endif /* FEATURE_XO */\r
1206 #ifdef FEATURE_MMGSDI\r
1207    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1208    tcb_ptr[i++] = TASK_HANDLE(gsdi);\r
1209 #endif /* FEATURE_MMGSDI */\r
1210 #ifdef FEATURE_FTM_TASK\r
1211    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1212    tcb_ptr[i++] = TASK_HANDLE(ftm);\r
1213 #endif /* FEATURE_FTM_TASK */\r
1214 #ifdef FEATURE_GSTK\r
1215    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1216    tcb_ptr[i++] = TASK_HANDLE(gstk);\r
1217 #endif /* FEATURE_GSTK */\r
1218 #ifdef FEATURE_UIM\r
1219    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1220    tcb_ptr[i++] = TASK_HANDLE(uim);\r
1221 #endif /* FEATURE_UIM */\r
1222 #ifdef FEATURE_BCMCS\r
1223    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1224    tcb_ptr[i++] = TASK_HANDLE(bcdb);\r
1225 #endif /* FEATURE_BCMCS */\r
1226 #ifdef FEATURE_JOYST_TASK\r
1227    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1228    tcb_ptr[i++] = TASK_HANDLE(joyst);\r
1229 #endif  /* FEATURE_JOSYT_TASK */\r
1230 #ifdef FEATURE_DTV\r
1231    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1232    tcb_ptr[i++] = TASK_HANDLE(dtv);\r
1233 #endif /* FEATURE_DTV */\r
1234 #ifdef FEATURE_PBM_TASK\r
1235    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1236    tcb_ptr[i++] = TASK_HANDLE(pbm);\r
1237 #endif /* FEATURE_PBM_TASK */\r
1238 #ifdef FEATURE_APS\r
1239    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1240    tcb_ptr[i++] = TASK_HANDLE(aps);\r
1241 #endif /* FEATURE_APS */\r
1242 #ifdef FEATURE_ATS\r
1243    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1244    tcb_ptr[i++] = TASK_HANDLE(ats);\r
1245 #endif /* FEATURE_ATS */\r
1246 #ifdef FEATURE_PM_SERVER\r
1247    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1248    tcb_ptr[i++] = TASK_HANDLE(pms);\r
1249 #endif /* FEATURE_PM_SERVER */\r
1250 #ifdef FEATURE_QIPCALL\r
1251    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1252    tcb_ptr[i++] = TASK_HANDLE(qipcall);\r
1253 #endif  /* FEATURE_QIPCALL */\r
1254 #ifdef FEATURE_MFLO\r
1255 #error code not present\r
1256 #endif  /* FEATURE_MFLO */\r
1257 #if defined(FEATURE_DISP_TASK) && (!defined(T_MSM7500) || defined(T_MSM7500) && defined(IMAGE_APPS_PROC))\r
1258    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1259    tcb_ptr[i++] = TASK_HANDLE(disp);\r
1260 #endif /* FEATURE_DISP_TASK */\r
1261 #ifdef FEATURE_AVS_SBCENC_TASK\r
1262    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1263    tcb_ptr[i++] = TASK_HANDLE(sbcenc);\r
1264 #endif\r
1265 #ifdef FEATURE_UBM_L1\r
1266    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1267    tcb_ptr[i++] = TASK_HANDLE(ubm_l1);\r
1268 #endif /* FEATURE_UBM_L1 */\r
1269 #ifdef FEATURE_CHG_TASK\r
1270    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1271    tcb_ptr[i++] = TASK_HANDLE(chg);\r
1272 #endif /* FEATURE_CHG_TASK */\r
1273 #ifdef FEATURE_CTA\r
1274     wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1275     tcb_ptr[i++] = TASK_HANDLE(cta) ;;\r
1276 #endif /* FEATURE_CTA */\r
1277 \r
1278    (void) rex_clr_sigs(rex_self(), TMC_ACK_SIG);\r
1279 \r
1280    /* If total num of offline task are greater than TMC_MAX_NUM_TASKS,\r
1281     ** you have to increase TMC_MAX_NUM_TASKS to match the number.\r
1282     */\r
1283    num_of_task = i ;\r
1284 \r
1285    /* Sending offline signale and timer wait for ACK signale.*/\r
1286 \r
1287    for (i = 0; i < num_of_task; i++)\r
1288    {\r
1289                 QSR_TMC_MSG_MED( 918780172ULL, "Offline task : %c%c%c.",\r
1290                                                 tcb_ptr[i]->task_name[0],\r
1291          tcb_ptr[i]->task_name[1],\r
1292          tcb_ptr[i]->task_name[2]);//auto-gen, to change remove 'QSR_' and first param\r
1293 \r
1294       (void) rex_set_sigs(tcb_ptr[i], TASK_OFFLINE_SIG);\r
1295 \r
1296       /* Report dog first so that it would not timer out immediately after we are\r
1297        ** waiting for ack signal from other tasks.\r
1298        */\r
1299       tmc_dog_report();\r
1300 \r
1301       /* Set the Sanity Timer to avoid having the possibility of\r
1302        ** losing the time when the wrong Task Acks back after\r
1303        ** it had timed out\r
1304        */\r
1305       (void) rex_set_timer (&tmc_wait_timer, wait_cnt[i]);\r
1306 \r
1307       do\r
1308       {\r
1309          /* Wait for either the Sanity Timer to Expire or\r
1310           ** the TMC_ACK_SIG To occur\r
1311           */\r
1312          received_sigs = rex_wait(TMC_ACK_SIG | TMC_WAIT_SIG);\r
1313 \r
1314          (void) rex_clr_sigs(rex_self(), TMC_ACK_SIG);\r
1315          /* Get out only, if the task that acks back\r
1316           ** is the task that we are waiting for\r
1317           */\r
1318       } while( !tmc_is_ack_task( tcb_ptr[i] ) &&\r
1319          !(received_sigs & TMC_WAIT_SIG) );\r
1320 \r
1321       (void) rex_clr_timer(&tmc_wait_timer);\r
1322 \r
1323       (void) rex_clr_sigs(rex_self(), TMC_WAIT_SIG);\r
1324 \r
1325       if (received_sigs & TMC_WAIT_SIG)\r
1326       {\r
1327          QSR_TMC_MSG_ERROR( 2284056914ULL, "Offline timer out task : %c%c%c.",\r
1328             tcb_ptr[i]->task_name[0],\r
1329             tcb_ptr[i]->task_name[1],\r
1330             tcb_ptr[i]->task_name[2]);//auto-gen, to change remove 'QSR_' and first param\r
1331       }\r
1332    }\r
1333 } /* tmc_offline_tasks */\r
1334 \r
1335 /*===========================================================================\r
1336 \r
1337 FUNCTION tmc_stop_tasks\r
1338   The function sends the stop signal to each task then waits for\r
1339   the task to acknowledge the signal.\r
1340 \r
1341 DEPENDENCIES\r
1342   Task Main Controller has start.\r
1343 \r
1344 RETURN VALUE\r
1345   void\r
1346 \r
1347 SIDE EFFECTS\r
1348   void\r
1349 \r
1350 ===========================================================================*/\r
1351 static void  tmc_stop_tasks(void)\r
1352 {\r
1353    rex_sigs_type        received_sigs;                   /* Received signal */\r
1354    rex_tcb_type         *tcb_ptr[TMC_MAX_NUM_OF_TASK];   /* Stop task array */\r
1355    int                  i=0,num_of_task;          /* number of task counter */\r
1356    /* the wait time counter in milliseconds */\r
1357    rex_timer_cnt_type   wait_cnt[TMC_MAX_NUM_OF_TASK];\r
1358 \r
1359 #ifdef FEATURE_DOG\r
1360    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1361    tcb_ptr[i++] = TASK_HANDLE(dog);\r
1362 #endif /* FEATURE_DOG */\r
1363 #ifdef TMC_SLEEP\r
1364    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1365    tcb_ptr[i++] = TASK_HANDLE(sleep);\r
1366 #endif /* TMC_SLEEP */\r
1367 #ifdef FEATURE_DH\r
1368    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1369    tcb_ptr[i++] = TASK_HANDLE(dh);\r
1370 #endif /* FEATURE_DH */\r
1371 #ifdef FEATURE_ONCRPC\r
1372 #ifdef FEATURE_STA\r
1373    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1374    tcb_ptr[i++] = TASK_HANDLE(sta);\r
1375 #endif /* FEATURE_STA */\r
1376    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1377    tcb_ptr[i++] = TASK_HANDLE(oncrpc);\r
1378 #endif /* FEATURE_ONCRPC */\r
1379 #if defined(FEATURE_WLAN) && !defined(FEATURE_MULTIPROCESSOR)\r
1380    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1381    tcb_ptr[i++] = TASK_HANDLE(wlan_cp);\r
1382    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1383    tcb_ptr[i++] = TASK_HANDLE(wlan_trp);\r
1384    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1385    tcb_ptr[i++] = TASK_HANDLE(wlan_sec);\r
1386 #if defined(FEATURE_WLAN_DECOUPLE_DS)\r
1387    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1388    tcb_ptr[i++] = TASK_HANDLE(wlan_ds);\r
1389 #endif\r
1390 #endif  /* FEATURE_WLAN && !FEATURE_MULTIPROCESSOR */\r
1391 #if defined(FEATURE_DATA) && !defined(FEATURE_DATA_ON_APPS)\r
1392    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1393    tcb_ptr[i++] = TASK_HANDLE(ds);\r
1394 #ifdef FEATURE_DATA_PS\r
1395    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1396    tcb_ptr[i++] = TASK_HANDLE(ps);\r
1397 #ifdef FEATURE_DATA_PS_DCC\r
1398    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1399    tcb_ptr[i++] = TASK_HANDLE(dcc);\r
1400 #endif /* FEATURE_DATA_PS_DCC */\r
1401 #ifdef FEATURE_DATA_PS_SOCK_REARCH\r
1402    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1403    tcb_ptr[i++] = TASK_HANDLE(ds_sig);\r
1404 #endif /* FEATURE_DATA_PS_SOCK_REARCH */\r
1405 #endif /* FEATURE_DATA_PS */\r
1406 #ifdef FEATURE_DATA_MUX\r
1407 #error code not present\r
1408 #endif\r
1409 #endif /* defined(FEATURE_DATA) && !defined FEATURE_DATA_ON_APPS) */\r
1410 #ifdef FEATURE_DATA\r
1411 #ifdef FEATURE_COMP_TASK\r
1412    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1413    tcb_ptr[i++] = TASK_HANDLE(comp);\r
1414 #endif /* FEATURE_COMP_TASK */\r
1415 #endif\r
1416 #if defined(FEATURE_GAN) && !(defined(IMAGE_APPS_PROC))\r
1417 #error code not present\r
1418 #endif\r
1419 #ifdef FEATURE_GAN\r
1420 #error code not present\r
1421 #endif\r
1422 #ifndef FEATURE_SEC_PROCESS_INIT\r
1423 #ifdef FEATURE_IXHTTPSVC\r
1424    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1425    tcb_ptr[i++] = TASK_HANDLE(ix_httpsvc);\r
1426 #endif\r
1427 #ifdef FEATURE_IXTIMESVC\r
1428    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1429    tcb_ptr[i++] = TASK_HANDLE(ix_timesvc);\r
1430 #endif\r
1431 #ifdef FEATURE_IXCONTENTSVC\r
1432    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1433    tcb_ptr[i++] = TASK_HANDLE(ix_contentclnt);\r
1434 #endif\r
1435 #endif /* !FEATURE_SEC_PROCESS_INIT */\r
1436 #ifdef FEATURE_IXCONTENTSVC\r
1437    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1438    tcb_ptr[i++] = TASK_HANDLE(ix_contentsvc);\r
1439 #endif\r
1440 #ifndef FEATURE_SEC_PROCESS_INIT\r
1441 #ifdef FEATURE_IXDESCRAMBLERSVC\r
1442    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1443    tcb_ptr[i++] = TASK_HANDLE(ix_descramblersvc);\r
1444 #endif\r
1445 #ifdef FEATURE_SEC\r
1446    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1447    tcb_ptr[i++] = TASK_HANDLE(sec);\r
1448 #ifdef FEATURE_SEC_CONTENT_AGENT\r
1449    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1450    tcb_ptr[i++] = TASK_HANDLE(contentagentdiag);\r
1451 #endif\r
1452 #ifdef FEATURE_SEC_ARM_CRYPTO\r
1453    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1454    tcb_ptr[i++] = TASK_HANDLE(seccryptarm);\r
1455 #endif\r
1456 #ifdef FEATURE_SECRND\r
1457    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1458    tcb_ptr[i++] = TASK_HANDLE(secrnd);\r
1459 #endif\r
1460 #ifdef FEATURE_SEC_USFS\r
1461    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1462    tcb_ptr[i++] = TASK_HANDLE(sfs);\r
1463 #endif\r
1464 #endif /* FEATURE_SEC */\r
1465 #endif /* !FEATURE_SEC_PROCESS_INIT */\r
1466 #ifdef FEATURE_SEC\r
1467 #ifdef FEATURE_SSD\r
1468         wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1469         tcb_ptr[i++] = TASK_HANDLE(ssd);\r
1470 #endif\r
1471 #ifdef FEATURE_SEC_SSL\r
1472    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1473    tcb_ptr[i++] = TASK_HANDLE(secssl);\r
1474 #endif /* FEATURE_SEC_SSL */\r
1475 #if defined(FEATURE_SEC_SSL_TESTAPP) || defined(FEATURE_SEC_CRYPT_TESTAPP)\r
1476    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1477    tcb_ptr[i++] = TASK_HANDLE(sectestapp);\r
1478 #endif /* FEATURE_SEC_SSL_TESTAPP || FEATURE_SEC_CRYPT_TESTAPP */\r
1479 #ifdef FEATURE_SEC_IPSEC\r
1480    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1481    tcb_ptr[i++] = TASK_HANDLE(secips);\r
1482 #endif\r
1483 #ifdef FEATURE_SEC_DRM\r
1484    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1485    tcb_ptr[i++] = TASK_HANDLE(secdrm);\r
1486 #endif /* FEATURE_SEC_DRM */\r
1487 #endif /* FEATURE_SEC */\r
1488 #ifdef FEATURE_DS_SOCKETS_TEST_TCP\r
1489 #error code not present\r
1490 #endif /* FEATURE_DS_SOCKETS_TEST_TCP */\r
1491 #ifdef FEATURE_DS_SOCKETS_TEST_UDP\r
1492 #error code not present\r
1493 #endif /* FEATURE_DS_SOCKETS_TEST_UDP */\r
1494 #ifdef FEATURE_QMIP\r
1495 #error code not present\r
1496 #endif /* FEATURE_QMIP */\r
1497 #ifdef FEATURE_IS2000_TDSO\r
1498    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1499    tcb_ptr[i++] = TASK_HANDLE(tdso);\r
1500 #endif /* FEATURE_IS2000_TDSO */\r
1501 #if defined(FEATURE_AUTH) || defined(FEATURE_RUIM)\r
1502    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1503    tcb_ptr[i++] = TASK_HANDLE(auth);\r
1504 #endif /* FEATURE_AUTH || FEATURE_RUIM */\r
1505 #ifdef FEATURE_HDR\r
1506    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1507    tcb_ptr[i++] = TASK_HANDLE(hdrsrch);\r
1508    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1509    tcb_ptr[i++] = TASK_HANDLE(hdrrx);\r
1510    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1511    tcb_ptr[i++] = TASK_HANDLE(hdrtx);\r
1512    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1513    tcb_ptr[i++] = TASK_HANDLE(hdrmc);\r
1514 #endif /* FEATURE_HDR */\r
1515 #ifdef FEATURE_HDR_BCMCS\r
1516    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1517    tcb_ptr[i++] = TASK_HANDLE(hdrbc);\r
1518 #endif /* FEATURE_HDR_BCMCS */\r
1519 #ifdef FEATURE_VBATT_TASK\r
1520    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT ;\r
1521    tcb_ptr[i++] = TASK_HANDLE(vbatt) ;\r
1522 #endif /* FEATURE_VBATT_TASK */\r
1523 #ifdef TMC_1X\r
1524    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1525    tcb_ptr[i++] = TASK_HANDLE(rxtx);\r
1526    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1527    tcb_ptr[i++] = TASK_HANDLE(srch);\r
1528    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1529    tcb_ptr[i++] = TASK_HANDLE(rx);\r
1530    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1531    tcb_ptr[i++] = TASK_HANDLE(tx);\r
1532 #endif /* TMC_1X */\r
1533 #ifdef FEATURE_CM\r
1534    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1535    tcb_ptr[i++] = TASK_HANDLE(cm);\r
1536 #endif /* FEATURE_CM */\r
1537 #if defined( FEATURE_BT ) && !defined(IMAGE_MODEM_PROC)\r
1538    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1539    tcb_ptr[i++] = TASK_HANDLE(bt);\r
1540 #ifdef FEATURE_BT_FS_TASK\r
1541    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1542    tcb_ptr[i++] = TASK_HANDLE(bt_fs);\r
1543 #endif /* FEATURE_BT_FS_TASK */\r
1544 #endif /* FEATURE_BT && !IMAGE_MODEM_PROC */\r
1545 #ifdef FEATURE_FM\r
1546    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1547    tcb_ptr[i++] = TASK_HANDLE(fmrds);\r
1548 #endif /* FEATURE_FM */\r
1549 #ifdef FEATURE_IG_QDIAG\r
1550    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1551    tcb_ptr[i++] = TASK_HANDLE(qdiag);\r
1552 #endif /* FEATURE_IG_QDIAG */\r
1553 #ifdef FEATURE_DIAG_TASK\r
1554    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1555    tcb_ptr[i++] = TASK_HANDLE(diag);\r
1556 #endif /* FEATURE_DIAG_TASK */\r
1557 #if !defined(FEATURE_THIN_UI) && !defined(FEATURE_UI_CORE_REMOVED)\r
1558 #ifdef FEATURE_HS\r
1559    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1560    tcb_ptr[i++] = TASK_HANDLE(hs);\r
1561 #endif /* FEATURE_HS */\r
1562 #endif /* !defined(FEATURE_THIN_UI) && !defined(FEATURE_UI_CORE_REMOVED) */\r
1563 #ifdef FEATURE_IDS\r
1564 #error code not present\r
1565 #endif /* FEATURE_IDS */\r
1566 #if defined(FEATURE_USB) && !defined(FEATURE_NO_USB_HW_ON_PROCESSOR)\r
1567    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1568    tcb_ptr[i++] = TASK_HANDLE(usbdc);\r
1569 #ifdef FEATURE_USB_HOST_ENHANCED\r
1570    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1571    tcb_ptr[i++] = TASK_HANDLE(usbhc_urb);\r
1572    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1573    tcb_ptr[i++] = TASK_HANDLE(usbhc_dev);\r
1574 #if defined(FEATURE_USB_HOST_TEST_ENHANCED) && (defined(FEATURE_USB_HOST_MASS_STORAGE_TEST_ENHANCED) || defined(FEATURE_USB_HOST_HID_TEST_ENHANCED))\r
1575    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1576    tcb_ptr[i++] = TASK_HANDLE(usbhc_test);\r
1577 #endif\r
1578 #endif\r
1579 #endif /* FEATURE_USB */\r
1580 #if defined(FEATURE_HS_USB) && (defined(FEATURE_STANDALONE_MODEM) || !defined(FEATURE_NO_USB_HW_ON_PROCESSOR))\r
1581 #ifdef FEATURE_HS_USB_MS_FD\r
1582    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1583    tcb_ptr[i++] = TASK_HANDLE(hsu_al_ms);\r
1584 #endif\r
1585    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1586    tcb_ptr[i++] = TASK_HANDLE(hsu_al_task);\r
1587 #endif /* FEATURE_HS_USB && (FEATURE_STANDALONE_MODEM || !FEATURE_NO_USB_HW_ON_PROCESSOR) */\r
1588 #ifdef FEATURE_SMD\r
1589    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1590    tcb_ptr[i++] = TASK_HANDLE(smd);\r
1591 #endif /*FEATURE_SMD*/\r
1592 #ifdef FEATURE_TIME_IPC_TASK\r
1593    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1594    tcb_ptr[i++] = TASK_HANDLE(time_ipc);\r
1595 #endif /*FEATURE_TIME_IPC_TASK */\r
1596 #ifdef FEATURE_NV\r
1597    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1598    tcb_ptr[i++] = TASK_HANDLE(nv);\r
1599 #endif /* FEATURE_NV */\r
1600 #ifdef FEATURE_VS_TASK\r
1601    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1602    tcb_ptr[i++] = TASK_HANDLE(vs);\r
1603 #endif /* FEATURE_VS_TASK */\r
1604 #ifdef FEATURE_GRAPH_TASK\r
1605    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1606    tcb_ptr[i++] = TASK_HANDLE(graph);\r
1607 #endif /* FEATURE_GRAPH_TASK */\r
1608 #ifdef FEATURE_GFX_TASK\r
1609    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1610    tcb_ptr[i++] = TASK_HANDLE(gfx);\r
1611 #endif /* FEATURE_GFX_TASK */\r
1612 #ifdef FEATURE_CAMERA_DRV_TASK\r
1613    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1614    tcb_ptr[i++] = TASK_HANDLE(camera_drv);\r
1615 #endif /* FEATURE_CAMERA_DRV_TASK */\r
1616 #ifdef FEATURE_SND_TASK\r
1617    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1618    tcb_ptr[i++] = TASK_HANDLE(snd);\r
1619 #endif /* FEATURE_SND_TASK */\r
1620 #ifdef FEATURE_VOC_TASK\r
1621    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1622    tcb_ptr[i++] = TASK_HANDLE(voc);\r
1623 #endif /* FEATURE_VOC_TASK */\r
1624 #ifdef FEATURE_QDSP_TASK\r
1625    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1626    tcb_ptr[i++] = TASK_HANDLE(qdsp);\r
1627 #endif /* FEATURE_QDSP_TASK */\r
1628 #ifdef FEATURE_QDSP_RTOS\r
1629    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1630    tcb_ptr[i++] = TASK_HANDLE(adsp_rtos);\r
1631 #endif /* FEATURE_QDSP_RTOS */\r
1632 #ifndef FEATURE_SEC_PROCESS_INIT\r
1633 #ifdef FEATURE_IXFILESVC\r
1634    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1635    tcb_ptr[i++] = TASK_HANDLE(ix_filesvc);\r
1636 #endif\r
1637 #ifdef FEATURE_IXSQLSVC\r
1638    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1639    tcb_ptr[i++] = TASK_HANDLE(ix_sqlsvc);\r
1640    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1641    tcb_ptr[i++] = TASK_HANDLE(ix_sqlclnt);\r
1642 #endif\r
1643 #endif /* !FEATURE_SEC_PROCESS_INIT */\r
1644 #ifdef FEATURE_EFS_SFAT\r
1645    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1646    tcb_ptr[i++] = TASK_HANDLE(sfat);\r
1647 #endif /* FEATURE_EFS_SFAT */\r
1648 #ifdef FEATURE_EFS\r
1649    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1650    tcb_ptr[i++] = TASK_HANDLE(fs);\r
1651 #endif /* FEATURE_EFS */\r
1652 #if ( defined(FEATURE_CDSMS) || defined(FEATURE_GWSMS) )\r
1653    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1654    tcb_ptr[i++] = TASK_HANDLE(wms);\r
1655 #endif /* FEATURE_CDSMS || FEATURE_GWSMS */\r
1656 #ifdef FEATURE_MDSP_TASK\r
1657    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1658    tcb_ptr[i++] = TASK_HANDLE(mdsp);\r
1659 #endif /* FEATURE_MDSP_TASK */\r
1660 #if (defined(FEATURE_CGPS) && !defined(FEATURE_DISABLE_CGPS))\r
1661    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1662    tcb_ptr[i++] = TASK_HANDLE(mgpmc);\r
1663    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1664    tcb_ptr[i++] = TASK_HANDLE(pp);\r
1665    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1666    tcb_ptr[i++] = TASK_HANDLE(cc);\r
1667 #ifdef FEATURE_CGPS_PGI_TASK\r
1668    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1669    tcb_ptr[i++] = TASK_HANDLE(pgi);\r
1670 #endif /* FEATURE_CGPS_PGI_TASK */\r
1671    wait_cnt[i] = TMC_WAIT_CNT_5SEC;\r
1672    tcb_ptr[i++] = TASK_HANDLE(cd);\r
1673    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1674    tcb_ptr[i++] = TASK_HANDLE(nf);\r
1675    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1676    tcb_ptr[i++] = TASK_HANDLE(gpsfft);\r
1677    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1678    tcb_ptr[i++] = TASK_HANDLE(lm);\r
1679    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1680    tcb_ptr[i++] = TASK_HANDLE(sm_tm);\r
1681 #ifdef FEATURE_CGPS_PD_COMMS_TCP_ON_MODEM\r
1682    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1683    tcb_ptr[i++] = TASK_HANDLE(pdcommtcp);\r
1684 #endif /* !FEATURE_DATA_ON_APPS */\r
1685    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1686    tcb_ptr[i++] = TASK_HANDLE(pdcommwms);\r
1687    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1688    tcb_ptr[i++] = TASK_HANDLE(gps_fs);\r
1689 #ifdef FEATURE_CGPS_LOC_MIDDLEWARE\r
1690    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1691    tcb_ptr[i++] = TASK_HANDLE(loc_middleware);\r
1692 #endif // FEATURE_CGPS_LOC_MIDDLEWARE\r
1693 #endif /* FEATURE_CGPS */\r
1694 #ifdef FEATURE_MMGSDI\r
1695    wait_cnt[i] = TMC_WAIT_CNT_5SEC;\r
1696    tcb_ptr[i++] = TASK_HANDLE(gsdi);\r
1697 #endif /* FEATURE_MMGSDI */\r
1698 #ifdef FEATURE_FTM_TASK\r
1699    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1700    tcb_ptr[i++] = TASK_HANDLE(ftm);\r
1701 #endif /* FEATURE_FTM_TASK */\r
1702 #ifdef FEATURE_GSTK\r
1703    wait_cnt[i] = TMC_WAIT_CNT_5SEC;\r
1704    tcb_ptr[i++] = TASK_HANDLE(gstk);\r
1705 #endif /* FEATURE_GSTK */\r
1706 #ifdef FEATURE_UIM\r
1707    wait_cnt[i] = TMC_WAIT_CNT_5SEC;\r
1708    tcb_ptr[i++] = TASK_HANDLE(uim);\r
1709 #endif /* FEATURE_UIM */\r
1710 #if defined( FEATURE_BT ) && !defined(IMAGE_MODEM_PROC)\r
1711 #ifdef FEATURE_BT_EXTPF\r
1712    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1713    tcb_ptr[i++] = TASK_HANDLE(bt_pf);\r
1714 #endif /* FEATURE_BT_EXTPF */\r
1715 #endif\r
1716 #ifdef FEATURE_BT_FTM_TASK\r
1717    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1718    tcb_ptr[i++] = TASK_HANDLE(bt_ftm);\r
1719 #endif\r
1720 #ifdef FEATURE_BCMCS\r
1721    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1722    tcb_ptr[i++] = TASK_HANDLE(bcdb);\r
1723 #endif /* FEATURE_BCMCS */\r
1724 #ifdef FEATURE_DTV\r
1725    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1726    tcb_ptr[i++] = TASK_HANDLE(dtv);\r
1727 #endif /* FEATURE_DTV */\r
1728 #ifdef FEATURE_JOYST\r
1729    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1730    tcp_ptr[i++] = TASK_HANDLE(joyst);\r
1731 #endif  /* FEATURE_JOYST */\r
1732 #ifdef FEATURE_PBM_TASK\r
1733    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1734    tcb_ptr[i++] = TASK_HANDLE(pbm);\r
1735 #endif /* FEATURE_PBM_TASK */\r
1736 #ifdef FEATURE_APS\r
1737    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1738    tcb_ptr[i++] = TASK_HANDLE(aps);\r
1739 #endif /* FEATURE_APS */\r
1740 #ifdef FEATURE_ATS\r
1741    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1742    tcb_ptr[i++] = TASK_HANDLE(ats);\r
1743 #endif /* FEATURE_ATS */\r
1744 #ifdef FEATURE_PM_SERVER\r
1745    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1746    tcb_ptr[i++] = TASK_HANDLE(pms);\r
1747 #endif /* FEATURE_PM_SERVER */\r
1748 #ifdef FEATURE_QIPCALL\r
1749    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1750    tcb_ptr[i++] = TASK_HANDLE(qipcall);\r
1751 #endif  /* FEATURE_QIPCALL */\r
1752 #ifdef FEATURE_MFLO\r
1753 #error code not present\r
1754 #endif  /* FEATURE_MFLO */\r
1755 #ifdef FEATURE_AVS_SBCENC_TASK\r
1756    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1757    tcb_ptr[i++] = TASK_HANDLE(sbcenc);\r
1758 #endif\r
1759 #ifdef FEATURE_FTM_CAMERA_TASK\r
1760    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1761    tcb_ptr[i++] = TASK_HANDLE(ftm_camera);\r
1762 #endif /*FEATURE_FTM_CAMERA_TASK */\r
1763 #ifdef FEATURE_UBM_L1\r
1764    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1765    tcb_ptr[i++] = TASK_HANDLE(ubm_l1);\r
1766 #endif /* FEATURE_UBM_L1 */\r
1767 #if defined(FEATURE_SENSORS)\r
1768    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1769    tcb_ptr[i++] = TASK_HANDLE(sns);\r
1770 #endif /* FEATURE_SENSORS */\r
1771 #ifdef FEATURE_CTA\r
1772     wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1773     tcb_ptr[i++] = TASK_HANDLE(cta);\r
1774 #endif /* FEATURE_CTA */\r
1775 #ifdef FEATURE_CHG_TASK\r
1776    wait_cnt[i] = TMC_DEFAULT_WAIT_CNT;\r
1777    tcb_ptr[i++] = TASK_HANDLE(chg);\r
1778 #endif /* FEATURE_CHG_TASK */\r
1779 #ifdef FEATURE_UI\r
1780       wait_cnt[i] = TMC_WAIT_CNT_5SEC;\r
1781       tcb_ptr[i++] = TASK_HANDLE(ui);\r
1782 #endif /* FEATURE_UI */\r
1783 \r
1784    (void) rex_clr_sigs(rex_self(), TMC_ACK_SIG);\r
1785 \r
1786    /* If total num of stop task are greater than TMC_MAX_NUM_TASKS,\r
1787     ** you have to increase TMC_MAX_NUM_TASKS to match the number.\r
1788     */\r
1789    num_of_task = i ;\r
1790 \r
1791    /* Sending stop signale and timed wait for ACK signale.*/\r
1792 \r
1793    for (i = 0; i < num_of_task; i++)\r
1794    {\r
1795 \r
1796                 QSR_TMC_MSG_MED( 2835790621ULL, "Stop task : %c%c%c.",\r
1797                                                 tcb_ptr[i]->task_name[0],\r
1798          tcb_ptr[i]->task_name[1],\r
1799          tcb_ptr[i]->task_name[2]);//auto-gen, to change remove 'QSR_' and first param\r
1800 \r
1801       (void) rex_set_sigs(tcb_ptr[i], TASK_STOP_SIG);\r
1802       /* Report dog first so that it would not timer out immediately after we are\r
1803        ** waiting for ack signal from other tasks.\r
1804        */\r
1805       tmc_dog_report();\r
1806 \r
1807       /* Set the Sanity Timer to avoid having the possibility of\r
1808        ** losing the time when the wrong Task Acks back after\r
1809        ** it had timed out\r
1810        */\r
1811       (void) rex_set_timer (&tmc_wait_timer, wait_cnt[i]);\r
1812 \r
1813       do\r
1814       {\r
1815          /* Wait for either the Sanity Timer to Expire or\r
1816           ** the TMC_ACK_SIG To occur\r
1817           */\r
1818          received_sigs = rex_wait(TMC_ACK_SIG | TMC_WAIT_SIG);\r
1819 \r
1820          (void) rex_clr_sigs(rex_self(), TMC_ACK_SIG);\r
1821          /* Get out only, if the task that acks back\r
1822           ** is the task that we are waiting for\r
1823           */\r
1824       } while( !tmc_is_ack_task( tcb_ptr[i] ) &&\r
1825          !(received_sigs & TMC_WAIT_SIG) );\r
1826 \r
1827       (void) rex_clr_timer(&tmc_wait_timer);\r
1828 \r
1829       (void) rex_clr_sigs(rex_self(), TMC_WAIT_SIG);\r
1830 \r
1831       if(received_sigs & TMC_WAIT_SIG)\r
1832       {\r
1833          QSR_TMC_MSG_ERROR( 3180694873ULL, "Stop timer out task : %c%c%c.",\r
1834             tcb_ptr[i]->task_name[0],\r
1835             tcb_ptr[i]->task_name[1],\r
1836             tcb_ptr[i]->task_name[2]);//auto-gen, to change remove 'QSR_' and first param\r
1837       }\r
1838    }\r
1839 } /* tmc_stop_tasks */\r
1840 \r
1841 /*===========================================================================\r
1842 \r
1843 FUNCTION tmc_online_handler\r
1844 \r
1845 DESCRIPTION\r
1846   This function is called when the MS is to transition to the  online\r
1847   state. The function processes the reset procedures.\r
1848 \r
1849 DEPENDENCIES\r
1850   Task Main Controller has start.\r
1851 \r
1852 RETURN VALUE\r
1853   void\r
1854 \r
1855 SIDE EFFECTS\r
1856   None\r
1857 \r
1858 ===========================================================================*/\r
1859 static void tmc_online_handler(void)\r
1860 {\r
1861    if ( tmc_get_state() == TMC_LPM )\r
1862    {\r
1863 #ifdef TMC_HW_IMPLEMENT_LPM\r
1864       TMC_VOID_FUNCTION_CALL(hw_exit_low_power_mode);\r
1865 #endif /* TMC_HW_IMPLEMENT_LPM */\r
1866    }\r
1867 }/* tmc_online__handler */\r
1868 \r
1869 /*===========================================================================\r
1870 \r
1871 FUNCTION tmc_offline_handler\r
1872 \r
1873 DESCRIPTION\r
1874   This function is called when the MS is to transition to the OFFLINE\r
1875   state. The function processes the offline command.\r
1876 \r
1877 DEPENDENCIES\r
1878   Task Main Controller has start.\r
1879 \r
1880 RETURN VALUE\r
1881   void\r
1882 \r
1883 SIDE EFFECTS\r
1884   None\r
1885 ===========================================================================*/\r
1886 static void tmc_offline_handler(void)\r
1887 {\r
1888   tmc_offline_tasks();  /* send task offline signals */\r
1889 \r
1890 #if (defined(FEATURE_DIAG_TASK) && defined(FEATURE_DIAG_COUPLED_ARCHITECTURE))\r
1891    (void) rex_set_sigs(TASK_HANDLE(diag), DIAG_OFFLINE_COMPLETE_SIG);    /* Send Offline complete signal to diag task in the end. */\r
1892 #endif /* FEATURE_DIAG_TASK && FEATURE_DIAG_COUPLED_ARCHITECTURE */\r
1893 \r
1894 #ifdef FEATURE_UIM_RUIM\r
1895 \r
1896     (void) uim_power_control(UIM_MC, FALSE);    /* Indicate to power down the RUIM */\r
1897 #endif /* FEATURE_UIM_RUIM */\r
1898 }/* tmc_offline_handler */\r
1899 \r
1900 /*===========================================================================\r
1901 \r
1902 FUNCTION tmc_reset_handler\r
1903 \r
1904 DESCRIPTION\r
1905   This function is called when the MS is to transition to the reset\r
1906   state. The function processes the reset procedures.\r
1907 \r
1908 DEPENDENCIES\r
1909   Task Main Controller has start.\r
1910 \r
1911 RETURN VALUE\r
1912   void\r
1913 \r
1914 SIDE EFFECTS\r
1915   None\r
1916 \r
1917 ===========================================================================*/\r
1918 static void tmc_reset_handler(void)\r
1919 {\r
1920 #ifdef FEATURE_SDCC_BOOT\r
1921    {\r
1922       /* if we're using eMMC boot, prepare the modem file system for reset */\r
1923 \r
1924       extern int efs_prepare_shutdown(void);\r
1925 \r
1926                 dog_task_disable(TRUE); /*Temp workaround to disable s/w wdog as efs_prepare_shutdown takes too long */\r
1927 \r
1928       (void)efs_prepare_shutdown();\r
1929    }\r
1930 #endif\r
1931 \r
1932 #ifdef FEATURE_UIM_RUIM\r
1933      (void) uim_power_control(UIM_MC, FALSE);     /* Indicate to power down the RUIM */\r
1934 #endif /* FEATURE_UIM_RUIM */\r
1935 \r
1936    tmc_stop_tasks();   /* Send stop signal to various tasks. */\r
1937 \r
1938    TMC_VOID_FUNCTION_CALL(hw_reset);   /* Finish the reset process */\r
1939 \r
1940 }/* tmc_reset_handler */\r
1941 \r
1942 /*===========================================================================\r
1943 \r
1944 FUNCTION tmc_powerdown_handler\r
1945 \r
1946 DESCRIPTION\r
1947   This function is called when the MS is to transition to the power down\r
1948   state. The function processes the powerdown command.\r
1949 \r
1950 DEPENDENCIES\r
1951   Task Main Controller has start.\r
1952 \r
1953 RETURN VALUE\r
1954   void\r
1955 \r
1956 SIDE EFFECTS\r
1957   None\r
1958 \r
1959 ===========================================================================*/\r
1960 void tmc_powerdown_handler(void)\r
1961 {\r
1962 #ifdef FEATURE_UIM_RUIM\r
1963    (void) uim_power_control(UIM_MC, FALSE);    /* Indicate to power down the RUIM */\r
1964 #endif /* FEATURE_UIM_RUIM */\r
1965 \r
1966 #if defined(FEATURE_TMC_TCXOMGR) || defined(FEATURE_TCXOMGR_TMC)\r
1967    {\r
1968       // void tcxomgr_powerdown(rex_tcb_type*, rex_sigs_type, void*);\r
1969       tcxomgr_powerdown(rex_self(), TMC_NV_CMD_SIG, (void (*)( rex_sigs_type ))tmc_wait);   /* Power off the TCXO manager */\r
1970    }\r
1971 #endif\r
1972 \r
1973    tmc_stop_tasks();   /* Send stop signal to various tasks. */\r
1974 \r
1975    TMC_VOID_FUNCTION_CALL(hw_power_off);   /* Finish the power down process */\r
1976 \r
1977 }/* tmc_powerdown_handler */\r
1978 \r
1979 /*===========================================================================\r
1980 \r
1981 LOCAL FUNCTION TMC_LPM_HANDLER\r
1982 \r
1983 DESCRIPTION\r
1984 \r
1985   This function handles the low power mode signal\r
1986 \r
1987 DEPENDENCIES\r
1988 \r
1989   None.\r
1990 \r
1991 RETURN VALUE\r
1992 \r
1993   None.\r
1994 \r
1995 SIDE EFFECTS\r
1996 \r
1997   None.\r
1998 \r
1999 ===========================================================================*/\r
2000 static void tmc_lpm_handler(void)\r
2001 {\r
2002 #ifdef TMC_HW_IMPLEMENT_LPM\r
2003    hw_enter_low_power_mode();\r
2004 #endif /* TMC_HW_IMPLEMENT_LPM */\r
2005 }\r
2006 \r
2007 /*===========================================================================\r
2008 \r
2009 FUNCTION tmc_set_state\r
2010 \r
2011 DESCRIPTION\r
2012   Set tmc operation state.\r
2013 \r
2014 DEPENDENCIES\r
2015   None.\r
2016 \r
2017 RETURN VALUE\r
2018   None.\r
2019 \r
2020 SIDE EFFECTS\r
2021   None.\r
2022 \r
2023 ===========================================================================*/\r
2024 static void tmc_set_state(tmc_state_e_type state)\r
2025 {\r
2026   tmc_data.state = state;\r
2027 } /* tmc_set_state */\r
2028 \r
2029 #ifdef FEATURE_UIM_RUIM\r
2030 /*===========================================================================\r
2031 \r
2032 FUNCTION tmc_store_esn_me\r
2033 \r
2034 DESCRIPTION\r
2035   This function store esn_me to TMC internal data structure.\r
2036 \r
2037 DEPENDENCIES\r
2038   None\r
2039 \r
2040 RETURN\r
2041   None\r
2042 \r
2043 SIDE EFFECTS\r
2044   None\r
2045 \r
2046 ===========================================================================*/\r
2047 static void tmc_store_esn_me (dword esn_me)\r
2048 {\r
2049   tmc_data.esn_me = esn_me;\r
2050 } /* tmc_store_esn_me */\r
2051 #endif /* FEATURE_UIM_RUIM */\r
2052 \r
2053 /*===========================================================================\r
2054 \r
2055 FUNCTION tmc_set_init_state\r
2056 \r
2057 DESCRIPTION\r
2058   Set tmc initialization state.\r
2059 \r
2060 DEPENDENCIES\r
2061   None.\r
2062 \r
2063 RETURN VALUE\r
2064   None.\r
2065 \r
2066 SIDE EFFECTS\r
2067   None.\r
2068 \r
2069 ===========================================================================*/\r
2070 static void tmc_set_init_state(boolean init_state)\r
2071 {\r
2072   tmc_data.is_init_done = init_state;\r
2073 } /* tmc_set_state */\r
2074 \r
2075 /*===========================================================================\r
2076 \r
2077 FUNCTION tmc_data_reset\r
2078 \r
2079 DESCRIPTION\r
2080   Reset TMC data.\r
2081 \r
2082 DEPENDENCIES\r
2083   None.\r
2084 \r
2085 RETURN VALUE\r
2086   None.\r
2087 \r
2088 SIDE EFFECTS\r
2089   None.\r
2090 \r
2091 ===========================================================================*/\r
2092 static void tmc_data_reset(void)\r
2093 {\r
2094 #ifdef FEATURE_UIM_RUIM\r
2095   tmc_data.esn_me = 0 ;\r
2096 #endif\r
2097   tmc_data.state = TMC_PWROFF ;\r
2098 } /* tmc_set_state */\r
2099 \r
2100 /*===========================================================================\r
2101 \r
2102 FUNCTION tmc_dispatch_commands\r
2103 \r
2104 DESCRIPTION\r
2105   This function handles the commands received in TMC's command queue.\r
2106   This function dequeues each command in the command queue\r
2107   until the command queue is empty. For each command, it looks at\r
2108   the command ID and handles it appropriately. Then it frees the command.\r
2109 \r
2110 DEPENDENCIES\r
2111   None.\r
2112 \r
2113 RETURN VALUE\r
2114   None.\r
2115 \r
2116 SIDE EFFECTS\r
2117   None.\r
2118 \r
2119 ===========================================================================*/\r
2120 static void  tmc_dispatch_commands(void)\r
2121 {\r
2122         tmc_cmd_type               *cmd_ptr;    /* To hold received command */\r
2123 \r
2124   /* We need to dequeue items from the internal\r
2125   ** command queue and process them till the queue is\r
2126   ** empty\r
2127   */\r
2128 \r
2129   while( (cmd_ptr = tmc_get_cmd()) != NULL)\r
2130   {\r
2131     /* Switch on the command id of the received command, and\r
2132     ** call the appropriate function to process each command.\r
2133     */\r
2134     switch( cmd_ptr->cmd_id )\r
2135     {\r
2136       case TMC_CMD_TYPE_ONLINE:\r
2137         tmc_online_handler();\r
2138         tmc_set_state(TMC_ONLINE);\r
2139         break;\r
2140 \r
2141       case TMC_CMD_TYPE_OFFLINE:\r
2142         tmc_offline_handler();\r
2143         tmc_set_state(TMC_OFFLINE);\r
2144         break;\r
2145 \r
2146       case TMC_CMD_TYPE_RESET:\r
2147         tmc_reset_handler();\r
2148         tmc_set_state(TMC_RESET);\r
2149         break;\r
2150 \r
2151       case TMC_CMD_TYPE_RESET_MODEM:\r
2152         tmc_set_state(TMC_RESET_MODEM);  \r
2153         TMC_ERR_FATAL(" MODEM RESET",0, 0, 0 );\r
2154         break;\r
2155 \r
2156       case TMC_CMD_TYPE_POWERDOWN:\r
2157         tmc_powerdown_handler();\r
2158         tmc_set_state(TMC_PWROFF);\r
2159         break;\r
2160 \r
2161       case TMC_CMD_TYPE_LPM:\r
2162         tmc_lpm_handler();\r
2163         tmc_set_state(TMC_LPM);\r
2164         break;\r
2165 \r
2166       default:\r
2167           /* receive a invalid command*/\r
2168           TMC_ERR("A invalid command",0,0,0);\r
2169           break;\r
2170       } /* switch */\r
2171 \r
2172       /* Free the command.\r
2173       */\r
2174       tmc_free_cmd( cmd_ptr );\r
2175 \r
2176     } /* end while */\r
2177 } /* tmc_dispatch_command */\r
2178 \r
2179 /*===========================================================================\r
2180 \r
2181 FUNCTION tmc_order_0_init\r
2182 \r
2183 DESCRIPTION\r
2184   This function does first part of power up initialization. The\r
2185   initialization is required before any tasks is defined or started.\r
2186 \r
2187 DEPENDENCIES\r
2188   None\r
2189 \r
2190 RETURN VALUE\r
2191   void\r
2192 \r
2193 SIDE EFFECTS\r
2194   None\r
2195 \r
2196 ===========================================================================*/\r
2197 static void tmc_order_0_init(void)\r
2198 {\r
2199 #if defined(TIMETEST)\r
2200    L4_MSM_TIMETEST_ENABLE(TRUE);\r
2201 #endif\r
2202 \r
2203 #ifdef FEATURE_L4_RECENT_THREADS\r
2204    /* Turn profiling (recent_threads) on */\r
2205    L4_MSM_PROFILE(1);\r
2206 #endif\r
2207 \r
2208 #ifdef FEATURE_TMC_WB_CACHE\r
2209    if (tmc_write_back_cache_on)\r
2210    {\r
2211       thread_ref_t tIgnore;\r
2212       memsection_ref_t ms;\r
2213 \r
2214       ms = memsection_lookup(TASK_STACK(dog), &tIgnore);\r
2215 \r
2216       memsection_set_attributes(ms, L4_WriteBackMemory);\r
2217    }\r
2218 #endif\r
2219 \r
2220    /*                    Generic Initialization                             */\r
2221 \r
2222 #ifdef FEATURE_SMEM\r
2223    /* Init the shared memory data structure */\r
2224    TMC_VOID_FUNCTION_CALL(smem_init);\r
2225    TMC_VOID_FUNCTION_CALL(mobile_init_modem_sw_build_id);\r
2226    TMC_VOID_FUNCTION_CALL(smem_proc_comm_init);\r
2227 #endif /* FEATURE_SMEM */\r
2228 \r
2229 #ifdef FEATURE_PMEM\r
2230 #ifdef PMEM_7K_INIT\r
2231         TMC_VOID_FUNCTION_CALL(pmem_module_init); /* Initialize the pmem system */\r
2232    TMC_VOID_FUNCTION_CALL(pmem_7k_init_smi);\r
2233 #else\r
2234    TMC_VOID_FUNCTION_CALL(pmem_7k_modem_init);\r
2235 #endif\r
2236 #endif\r
2237 \r
2238    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2239 \r
2240    tmcnv_init(TMC_NV_CMD_SIG, TMC_RPT_TIMER_SIG, tmc_dog_report);   /* Initialize TMC NV-Interface */\r
2241 \r
2242    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2243 \r
2244 #ifdef FEATURE_ENABLE_FLOATING_POINT_ERRORS\r
2245    TMC_VOID_FUNCTION_CALL(boot_enable_fp_errors);\r
2246 #endif\r
2247 \r
2248    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2249 \r
2250    TMC_VOID_FUNCTION_CALL(msg_init);                                          /* MSG services       */\r
2251 \r
2252    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2253 \r
2254    TMC_VOID_FUNCTION_CALL(dsm_init);                                          /* Data services      */\r
2255 \r
2256    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2257 \r
2258 #ifdef FEATURE_REX_IPC                             /* IPC header file    */\r
2259    TMC_VOID_FUNCTION_CALL(ipcmem_pool_init);\r
2260    TMC_VOID_FUNCTION_CALL(tsvc_init);\r
2261 #endif\r
2262 \r
2263    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2264 \r
2265    mem_init_heap(&tmc_heap, tmc_heap_mem_buffer, TMC_HEAP_MEM_BUFFER_SIZE, NULL);\r
2266    mem_init_heap(&tmc_heap_small, tmc_heap_small_mem_buffer, TMC_HEAP_SMALL_MEM_BUFFER_SIZE, NULL);\r
2267 \r
2268    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2269 \r
2270 #ifdef TMC_BIO_INIT\r
2271    TMC_VOID_FUNCTION_CALL(bio_init);                                          /* BIO initialization. */\r
2272 #endif /* TMC_BIO_INIT */\r
2273 \r
2274    TMC_VOID_FUNCTION_CALL(npa_init);                                          /* Initialize NPA */\r
2275 \r
2276    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2277 \r
2278         TMC_VOID_FUNCTION_CALL(clk_regime_init);                                   /* Init the clock regime to a known state. */\r
2279 \r
2280    TMC_VOID_FUNCTION_CALL(ddr_init);                                          /* Init DDR to a known state. */\r
2281 \r
2282    TMC_VOID_FUNCTION_CALL(CoreCpuInitialize);                                 /* Initialize the /core/cpu node */\r
2283 \r
2284    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2285 \r
2286    TMC_VOID_FUNCTION_CALL(tramp_init);                                        /* Interrupt initialization */\r
2287 \r
2288    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2289 \r
2290 #ifdef KILL_EBI0_CLOCK\r
2291 #if defined(FEATURE_BUSPERF)\r
2292    TMC_VOID_FUNCTION_CALL(bus_init);                                          /* Initialize the bus performance subsystem */\r
2293 #endif /* FEATURE_BUSPERF */\r
2294 #endif\r
2295 \r
2296 #if defined(FEATURE_BUSMON)\r
2297 #error code not present\r
2298 #endif /* FEATURE_BUSMON */\r
2299 \r
2300    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2301 \r
2302 #ifdef FEATURE_SMSM\r
2303    smsm_init(SMSM_MODEM);   /* shared memory state machine init */\r
2304    smsm_set_state(SMSM_THIS_HOST, SMSM_OEMSBL_RELEASE);   /* Give apps process access to the OEM SBL section */\r
2305 #endif /* FEATURE_SMSM */\r
2306 \r
2307 #ifdef FEATURE_DOG_KEEPALIVE_TASK\r
2308         TMC_VOID_FUNCTION_CALL(dog_keepalive_init);\r
2309 #endif\r
2310 \r
2311 #ifdef FEATURE_SMEM_LOG\r
2312    TMC_VOID_FUNCTION_CALL(smem_log_init);   /* shared memory event log init */\r
2313 #endif /* FEATURE_SMEM_LOG */\r
2314 \r
2315    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2316 \r
2317 #ifdef FEATURE_DMOV\r
2318    {\r
2319       void dmov_init(void*);\r
2320       /* Initialize DMOV data mover driver */\r
2321       /* The DMOV init on the modem process must happen before the DMOV init\r
2322       on the apps processor. So by placing the init on the modem processor\r
2323       before time_init. We know the the apps processor has not passed\r
2324       time_init and therefore has not reached DMOV init. */\r
2325       (void)dmov_init(NULL);\r
2326    }\r
2327 #endif\r
2328 \r
2329    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2330 \r
2331 #ifdef FEATURE_USE_TIME_VU\r
2332 \r
2333    TMC_VOID_FUNCTION_CALL(time_init);                                         /* Time services      */\r
2334 \r
2335 #ifdef FEATURE_TIMER_TASK\r
2336 \r
2337    rex_def_task_ext2(TASK_HANDLE(timer),\r
2338       (unsigned char*)TASK_STACK(timer),\r
2339       TIMER_STACK_SIZ * sizeof(rex_stack_word_type),\r
2340       TIMER_PRI,\r
2341       TASK_MAIN(timer),\r
2342       TASK_ARGV_NIL,\r
2343       TASK_IDENT(timer),\r
2344       FALSE,\r
2345       TASK_NODOG_RPT);\r
2346 \r
2347         // THIS TASK IS NOT IMPLEMENTED TO RESPOND TO THE REQUIRED\r
2348         // TMC SIGNALING PROTOCOL.\r
2349 \r
2350    //   (void) tmc_wait(TMC_ACK_SIG);\r
2351    //   (void) rex_clr_sigs(rex_self(), TMC_ACK_SIG);\r
2352 \r
2353 #endif /* FEATURE_TIMER_TASK */\r
2354 #endif /* FEATURE_USE_TIME_VU */\r
2355 \r
2356    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2357    /* Multi-processor SHIM layer */\r
2358 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2359 #if defined(FEATURE_DATA_ON_APPS) && defined(FEATURE_CDMA)\r
2360    TMC_VOID_FUNCTION_CALL(ds_mp_shim_modem_power_up_init);\r
2361 #endif /* FEATURE_DATA_ON_APPS */\r
2362 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2363 \r
2364    /* If FEATURE_PROGRESSIVE_BOOT is defined, then the time tick interrupt is\r
2365    serviced in the task context. The interrupt task should be started\r
2366    before enabling the interrupt so that the task is running when an\r
2367    interrupt accurrs\r
2368 */\r
2369 \r
2370 #if defined(FEATURE_PROGRESSIVE_BOOT) && !defined(FEATURE_TIMER_TASK)\r
2371 \r
2372    tmc_define_tasks_common(_TASK_INFO_P(interrupt), DOG_INTERRUPT_RPT);\r
2373 \r
2374 #endif /* FEATURE_PROGRESSIVE_BOOT && !FEATURE_TIMER_TASK */\r
2375 \r
2376    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2377 \r
2378    TMC_VOID_FUNCTION_CALL(sleepctl_init);                                     /* Initialize Sleep controller */\r
2379 \r
2380    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2381 \r
2382    gpio_int_init();                     /* Initialize GPIO interrupt handler*/\r
2383 \r
2384    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2385 \r
2386    _enable();                    /* Enable interrupts and start processing. */\r
2387 \r
2388    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2389 \r
2390 #ifdef TMC_HW_INIT\r
2391    hw_init(0);   /* Miscellaneous hardware initialization */\r
2392 #endif /* TMC_HW_INIT */\r
2393 \r
2394    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2395 \r
2396    TMC_VOID_FUNCTION_CALL(tlmm_init);   /* Initialize the TLMM. */\r
2397 \r
2398 #ifdef FEATURE_SENSORS\r
2399 \r
2400    /* The I2C attach on the modem processor must happen before any I2C access\r
2401     * on the apps processor.  Linux doesn't have capability to allocate\r
2402     * remote-lock since the lock (ie DAL I2C remote lock for I2C, DAL SPI\r
2403     * remote lock for SPI) is internal data-structures of DAL drivers and\r
2404     * there is no DAL framework in Linux kernel to see those data structure\r
2405     * of DAL drivers. If Linux doesn't see the lock during boot-up, it will\r
2406     * not allocate the remote-lock and we may run into concurrency issue.\r
2407     */\r
2408 \r
2409    TMC_VOID_FUNCTION_CALL(snsd_i2c_init);   /* Attach the Sensors I2C */\r
2410 \r
2411 #endif /* FEATURE_SENSORS */\r
2412 \r
2413    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2414 \r
2415    //lesp  sbi_init( SBI_9p6MHZ );\r
2416    sbi_init( SBI_DEFAULT_FREQ );\r
2417 \r
2418    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2419 \r
2420 #if defined(FEATURE_PM1000) || defined(FEATURE_PM1000_LDO_ONLY)\r
2421 #error code not present\r
2422 #endif\r
2423 \r
2424 #ifdef FEATURE_PMIC\r
2425    {\r
2426       pm_mpp_dlogic_lvl_type mpp3_levels [2] = {PM_MPP__DLOGIC__LVL_MSMP, PM_MPP__DLOGIC__LVL_VDD};\r
2427 \r
2428       pm_mpp_dlogic_out_ctrl_type mpp3_ctrls [2] = {PM_MPP__DLOGIC_OUT__CTRL_LOW, PM_MPP__DLOGIC_OUT__CTRL_HIGH};\r
2429 \r
2430       pm_mpp_dlogic_lvl_type mpp4_levels [1] = {PM_MPP__DLOGIC__LVL_MMC};\r
2431 \r
2432       pm_mpp_dlogic_out_ctrl_type mpp4_ctrls [2] = {PM_MPP__DLOGIC_OUT__CTRL_LOW, PM_MPP__DLOGIC_OUT__CTRL_HIGH};\r
2433 \r
2434 #ifdef FEATURE_WCDMA_PLT\r
2435 #error code not present\r
2436 #endif /* FEATURE_WCDMA_PLT */\r
2437       {\r
2438                         pm_init();            /* Please look at dependency notes inside the function before move around those code */\r
2439          pm_init_delayed();\r
2440       }\r
2441 \r
2442       pm_config_secure_mpp_config_digital_output (PM_MPP_3, mpp3_levels, 2, mpp3_ctrls, 2);\r
2443       pm_config_secure_mpp_config_digital_output (PM_MPP_4, mpp4_levels, 1, mpp4_ctrls, 2);\r
2444 \r
2445 #ifdef FEATURE_APPS_IMAGE_WINMOB\r
2446                 /* Temporary hack to enable the USBH core until the WM driver does this properly. */\r
2447       (void)pm_mpp_config_digital_output(PM_MPP_19,  /* RESET */\r
2448          PM_MPP__DLOGIC__LVL_VDD,\r
2449          PM_MPP__DLOGIC_OUT__CTRL_HIGH);\r
2450 \r
2451       (void)pm_mpp_config_digital_output(PM_MPP_20,  /* VBUS2_BOOST */\r
2452          PM_MPP__DLOGIC__LVL_VDD,\r
2453          PM_MPP__DLOGIC_OUT__CTRL_HIGH);\r
2454 #endif\r
2455 \r
2456 #ifdef FEATURE_BF3_SD_CONTROLLER\r
2457       (void) pm_mpp_config_digital_output( PM_MPP_3, PM_MPP__DLOGIC__LVL_VDD,\r
2458          PM_MPP__DLOGIC_OUT__CTRL_HIGH);\r
2459 #endif\r
2460 \r
2461 #if defined(SIRIUS_PLATFORM) && defined(WOLF_5)\r
2462 #error code not present\r
2463 #endif /* defined(SIRIUS_PLATFORM) && defined(WOLF_5) */\r
2464 \r
2465    }\r
2466 #endif /* FEATURE_PMIC */\r
2467 \r
2468 #ifdef FEATURE_HS_DETECT_BASEBAND_TYPE\r
2469 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2470    TMC_VOID_FUNCTION_CALL(hs_get_baseband_version);                           /* Read PCB ID after pm_init() */\r
2471 #endif\r
2472 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2473 \r
2474 #ifdef FEATURE_PMIC_RTC\r
2475    /* Initialization for RTC */\r
2476 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2477    clk_rtc_init();\r
2478 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2479 #endif /* FEATURE_PMIC_RTC */\r
2480 \r
2481    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2482 \r
2483 #if !defined(FEATURE_BRINGUP_DIAG_ONLY) || defined(FEATURE_BRINGUP_MULTIMEDIA_ONLY)\r
2484 #ifdef TMC_I2C_INIT\r
2485 #ifndef FEATURE_I2C_DIRECT_ON_ARM11\r
2486    TMC_VOID_FUNCTION_CALL(i2c_init);                                          /* I2C driver     */\r
2487 #endif\r
2488 #endif\r
2489 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
2490 \r
2491 #ifdef FEATURE_I2C_NPA\r
2492    i2c_npa_target_init();\r
2493 #endif\r
2494 \r
2495    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2496 \r
2497 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2498 \r
2499    TMC_VOID_FUNCTION_CALL(adc_init);\r
2500 \r
2501 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2502 \r
2503    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2504 \r
2505    sio_init();   /* Initialize SIO */\r
2506 \r
2507    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2508 \r
2509 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2510 #if defined(FEATURE_DATA_ON_APPS) && (defined(FEATURE_WCDMA) || defined(FEATURE_GSM))\r
2511    TMC_VOID_FUNCTION_CALL(dsmp_umts_modem_l2_initialize);\r
2512 #endif /* FEATURE_DATA_ON_APPS */\r
2513 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2514 \r
2515 #if defined(FEATURE_USB) && !defined(FEATURE_NO_USB_HW_ON_PROCESSOR)\r
2516 #ifdef FEATURE_USB_HOST\r
2517    TMC_VOID_FUNCTION_CALL(usbhost_api_init);   /* Initialize USB host API */\r
2518 #endif\r
2519 #endif\r
2520 \r
2521    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2522 \r
2523 #ifdef FEATURE_APS\r
2524    TMC_VOID_FUNCTION_CALL(aps_init);   /* Initialize APS */\r
2525 #endif /* FEATURE_APS */\r
2526 \r
2527    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2528 #define FEATURE_NO_UIM\r
2529 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2530 #if (defined( FEATURE_UIM_DRIVER ) && !defined(FEATURE_GSM_PLT))\r
2531 #ifndef FEATURE_NO_UIM\r
2532         TMC_VOID_FUNCTION_CALL(uim_dev_init);   /* UIM driver */\r
2533 #endif\r
2534 #endif /* FEATURE_UIM_DRIVER && !FEATURE_GSM_PLT*/\r
2535 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2536 \r
2537    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2538 \r
2539 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2540 #ifdef FEATURE_BATTERY_CHARGER\r
2541    tmc_chg_init();\r
2542 #endif\r
2543 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2544 \r
2545    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2546 \r
2547    /*                   Mode Specific Initialization                        */\r
2548    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2549 \r
2550    /*                         1x specific                                 */\r
2551 \r
2552    /*                         GSM specific                                  */\r
2553 \r
2554 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2555 #ifdef FEATURE_WCDMA\r
2556 #if (!defined(FEATURE_WCDMA_PLT) && !defined(FEATURE_GSM_PLT) && !defined(FEATURE_MVS))\r
2557    TMC_VOID_FUNCTION_CALL(wvs_init);   /* initialize Voice services */\r
2558 #endif /* !FEATURE_WCDMA_PLT && !FEATURE_MVS*/\r
2559 #endif /* FEATURE_WCDMA */\r
2560 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2561 \r
2562 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2563 #if (defined(FEATURE_WLAN) && !defined(FEATURE_MULTIPROCESSOR))\r
2564    TMC_VOID_FUNCTION_CALL(wlan_adp_init);                                     /* Initialize the WLAN Adapter library                  */\r
2565 #endif /* FEATURE_WLAN && !FEATURE_MULTIPROCESSOR */\r
2566 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2567 \r
2568 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2569 #if (defined(FEATURE_FACTORY_TESTMODE) && !defined(FEATURE_FTM_TASK))\r
2570    TMC_VOID_FUNCTION_CALL(ftm_tmc_init);                                      /* ftm initializaiton that has to be done in TMC task. */\r
2571 #endif /* FEATURE_FACTORY_TESTMODE && ! FEATURE_FTM_TASK */\r
2572 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2573 \r
2574    TMC_VOID_FUNCTION_CALL(tmcdiag_init);   /* Register TMC dispatch table through diag interface */\r
2575 \r
2576 #ifdef FEATURE_PROFDIAG\r
2577 #error code not present\r
2578 #endif\r
2579 \r
2580    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2581 \r
2582 #ifdef FEATURE_L4LINUX\r
2583         if (qids_smms_init(SMMS_DEAFULT_SERVER_PRIORITY) == SMMS_STATUS_SUCCESS)        /* Init SMMS Library */\r
2584    {\r
2585       /* Start a loopback server in background */\r
2586       qids_smms_start_loopback_server(SMMS_LOOPBACK_SERVER_PRIORITY,\r
2587          SMMS_SERVICE_ECHO1);\r
2588    }\r
2589 #endif\r
2590 \r
2591    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2592 \r
2593 #ifdef FEATURE_CBSP_TEST\r
2594     TMC_VOID_FUNCTION_CALL(apttests_daltf_init); /* Initialize apttests     */\r
2595 #endif\r
2596 }                                                                          /* tmc_order_0_init */\r
2597 \r
2598 /*===========================================================================\r
2599 \r
2600 FUNCTION tmc_order_0_exec\r
2601   This function creates all the software tasks with the rex_def_task\r
2602   procedure.  After a task has been created it sets the TMC_ACK_SIG to\r
2603   communicate to the Task Main Control task that it has completed static\r
2604   initialization.  This procedure waits to receive the TMC_ACK_SIG before\r
2605   creating the next software task.\r
2606 \r
2607 DEPENDENCIES\r
2608   The watchdog task resetting the Watchdog timer while attempting to\r
2609   start all other tasks. If the unable to create other tasks in the time\r
2610   allotted by the Watchdog task, the Watchdog task will log the error and\r
2611   reset the microprocessor.\r
2612 \r
2613 RETURN VALUE\r
2614   void\r
2615 \r
2616 SIDE EFFECTS\r
2617   After this procedure all the tasks in the Software system will have\r
2618   performed preliminary initialization and will be waiting for the\r
2619   startup signal from the Main Control task.\r
2620 \r
2621 ===========================================================================*/\r
2622 static void tmc_order_0_exec(void)\r
2623 {\r
2624    /* Enable and disable autodog for MC as a way of getting the dog report\r
2625     ** id into the TCB.\r
2626     */\r
2627    (void) rex_autodog_enable( DOG_TMC_RPT );\r
2628    (void) rex_autodog_disable( );\r
2629 \r
2630 #ifdef FEATURE_SOFTWARE_PROFILE\r
2631 #ifdef FEATURE_MSMHWIO\r
2632    rex_init_profile( HWIO_ADDR(TIME_TICK2_COUNT) );\r
2633 #else\r
2634    rex_init_profile( TIME_TICK2_COUNT_WH );\r
2635 #endif /* FEATURE_MSMHWIO */\r
2636 #endif\r
2637 \r
2638 #ifdef TIMETEST\r
2639 #ifdef TIMETEST_PROF\r
2640    TMC_VOID_FUNCTION_CALL(timetest_prof_init);\r
2641 #endif /* TIMETEST_PROF */\r
2642 #endif /* TIMETEST*/\r
2643 \r
2644         (void) rex_clr_sigs(rex_self(), TMC_ACK_SIG);   /* Clear ACK signal. */\r
2645 \r
2646    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2647    /* If FEATURE_PROGRESSIVE_BOOT is defined, then the pager task should be\r
2648    started  as early as possible to reduce the number of page faults\r
2649    handled in abort context\r
2650 */\r
2651 #ifdef FEATURE_PROGRESSIVE_BOOT\r
2652 \r
2653    rex_def_task_ext2(TASK_HANDLE(pager),\r
2654       (unsigned char*)TASK_STACK(pager),\r
2655       PAGER_STACK_SIZ * sizeof(rex_stack_word_type),\r
2656       PAGER_PRI,\r
2657       TASK_MAIN(pager),\r
2658       TASK_ARGV_NIL,\r
2659       TASK_IDENT(pager),\r
2660       FALSE,\r
2661       TASK_NODOG_RPT);      \r
2662 \r
2663         // THIS TASK IS NOT IMPLEMENTED TO RESPOND TO THE REQUIRED\r
2664         // TMC SIGNALING PROTOCOL.\r
2665 \r
2666    //   (void) tmc_wait(TMC_ACK_SIG);\r
2667    //   (void) rex_clr_sigs(rex_self(), TMC_ACK_SIG);\r
2668 \r
2669 #endif /* FEATURE_PROGRESSIVE_BOOT */\r
2670 \r
2671    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2672 \r
2673    tmc_define_tasks_common(_TASK_INFO_P(sleep), DOG_SLEEP_RPT);\r
2674 \r
2675    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2676 #if ! defined(FEATURE_BRINGUP_DIAG_ONLY) || defined(FEATURE_BRINGUP_MULTIMEDIA_ONLY)\r
2677 #ifdef FEATURE_APPS_TCXO_SLEEP\r
2678 \r
2679    tmc_define_tasks_common(_TASK_INFO_P(dem), TASK_NODOG_RPT);\r
2680 \r
2681 #endif /* FEATURE_APPS_TCXO_SLEEP */\r
2682 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
2683 \r
2684    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2685 \r
2686 #ifdef FEATURE_SMD\r
2687 \r
2688    tmc_define_tasks_common(_TASK_INFO_P(smd), TASK_NODOG_RPT);\r
2689 \r
2690 #endif /*FEATURE_SMD*/\r
2691 \r
2692    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2693 \r
2694 #ifdef FEATURE_ONCRPC\r
2695 \r
2696    tmc_define_tasks_common(_TASK_INFO_P(oncrpc), TASK_NODOG_RPT);\r
2697 \r
2698 #ifdef FEATURE_STA\r
2699 \r
2700    tmc_define_tasks_common(_TASK_INFO_P(sta), TASK_NODOG_RPT);\r
2701 \r
2702 #endif /* FEATURE_STA */\r
2703 \r
2704 #endif /* FEATURE_ONCRPC */\r
2705 \r
2706    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2707 \r
2708 #ifdef FEATURE_DOG\r
2709 \r
2710    tmc_define_tasks_common(_TASK_INFO_P(dog), TASK_NODOG_RPT);\r
2711 \r
2712 #endif /* FEATURE_DOG */\r
2713 \r
2714    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2715 \r
2716 #ifdef SIRIUS_PLATFORM\r
2717 #error code not present\r
2718 #endif /* SIRIUS_PLATFORM */\r
2719 \r
2720    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2721 \r
2722 #if !defined(FEATURE_BRINGUP_DIAG_ONLY) || defined(FEATURE_BRINGUP_MULTIMEDIA_ONLY)\r
2723 #ifdef FEATURE_QDSP_TASK\r
2724 \r
2725    tmc_define_tasks_common(_TASK_INFO_P(qdsp), DOG_QDSP_RPT);\r
2726 \r
2727 #endif /* FEATURE_QDSP_TASK */\r
2728 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
2729 \r
2730    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2731 \r
2732 #if !defined(FEATURE_BRINGUP_DIAG_ONLY) || defined(FEATURE_BRINGUP_MULTIMEDIA_ONLY)\r
2733 #ifdef FEATURE_QDSP_RTOS\r
2734 \r
2735    tmc_define_tasks_common(_TASK_INFO_P(adsp_rtos), DOG_ADSP_RTOS_RPT);\r
2736 \r
2737 #endif /* FEATURE_ADSP_RTOS_TASK */\r
2738 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
2739 \r
2740    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2741 \r
2742 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2743 #ifdef FEATURE_VOC_TASK\r
2744 \r
2745    tmc_define_tasks_common(_TASK_INFO_P(voc), DOG_VOC_RPT);\r
2746 \r
2747 #endif /* FEATURE_VOC_TASK */\r
2748 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2749 \r
2750    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2751 \r
2752 #if !defined(FEATURE_BRINGUP_DIAG_ONLY) || defined(FEATURE_BRINGUP_MULTIMEDIA_ONLY)\r
2753 #ifdef FEATURE_SND_TASK\r
2754 \r
2755    tmc_define_tasks_common(_TASK_INFO_P(snd), DOG_SND_RPT);\r
2756 \r
2757 #endif /* FEATURE_SND_TASK */\r
2758 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
2759 \r
2760    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2761 \r
2762 #if ! defined(FEATURE_BRINGUP_DIAG_ONLY) || defined(FEATURE_BRINGUP_MULTIMEDIA_ONLY)\r
2763 #ifdef FEATURE_AVS_SBCENC_TASK\r
2764 \r
2765    tmc_define_tasks_common(_TASK_INFO_P(sbcenc), DOG_SBCENC_RPT);\r
2766 \r
2767 #endif /* FEATURE_AVS_SBCENC_TASK */\r
2768 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
2769 \r
2770    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2771 \r
2772 #if ! defined(FEATURE_BRINGUP_DIAG_ONLY) || defined(FEATURE_BRINGUP_MULTIMEDIA_ONLY)\r
2773 #if !defined(FEATURE_THIN_UI) && !defined(FEATURE_UI_CORE_REMOVED) || defined(FEATURE_HS_POLLING_ON_MODEM)\r
2774 \r
2775 #ifdef FEATURE_HS\r
2776 \r
2777    tmc_define_tasks_common(_TASK_INFO_P(hs), DOG_HS_RPT);\r
2778 \r
2779 #endif /* FEATURE_HS */\r
2780 \r
2781 #endif /* !defined(FEATURE_THIN_UI) && !defined(FEATURE_UI_CORE_REMOVED) || defined(FEATURE_HS_POLLING_ON_MODEM)*/\r
2782 \r
2783 #if defined(FEATURE_PMIC) && !defined(FEATURE_KEYPAD_USES_GPIO_FOR_PWR_KEY)\r
2784    /* Initialize the Power Key.  Without this, PMIC will not send an\r
2785     * IRQ to MSM when power key is pressed */\r
2786    TMC_VOID_FUNCTION_CALL(pm_pwr_key_init);\r
2787 #endif\r
2788 \r
2789 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
2790 \r
2791    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2792 \r
2793 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2794 #ifdef FEATURE_IS2000_TDSO\r
2795 \r
2796    tmc_define_tasks_common(_TASK_INFO_P(tdso), DOG_TDSO_RPT);\r
2797 \r
2798 #endif /* FEATURE_IS2000_TDSO */\r
2799 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2800 \r
2801    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2802 \r
2803 #if !defined(FEATURE_BRINGUP_DIAG_ONLY) || defined(FEATURE_BRINGUP_MULTIMEDIA_ONLY)\r
2804 #ifdef FEATURE_IDS\r
2805 #error code not present\r
2806 #endif /* FEATURE_IDS */\r
2807 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
2808 \r
2809    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2810 \r
2811 #ifdef FEATURE_EFS\r
2812 \r
2813    tmc_define_tasks_common(_TASK_INFO_P(fs), DOG_FS_RPT);\r
2814 \r
2815 #if (defined(FS_FEATURE_RMTEFS_SERVER)||defined(FS_FEATURE_IG_IPC_SERVER)) && !defined(FEATURE_IG_EFS_EXT_SERVER)\r
2816 \r
2817    tmc_define_tasks_common(_TASK_INFO_P(efs_srvr), DOG_FS_RPT);\r
2818 \r
2819 #endif /* FS_FEATURE_RMTEFS_SERVER && !FEATURE_IG_EFS_EXT_SERVER */\r
2820 #endif /* FEATURE_EFS */\r
2821 \r
2822    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2823 \r
2824 #if !defined(FEATURE_BRINGUP_DIAG_ONLY) || defined(FEATURE_BRINGUP_MULTIMEDIA_ONLY)\r
2825 #ifdef FEATURE_EFS_SFAT\r
2826 \r
2827    tmc_define_tasks_common(_TASK_INFO_P(sfat), DOG_SFAT_RPT);\r
2828 \r
2829 #endif /* FEATURE_EFS_SFAT */\r
2830 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
2831 \r
2832    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2833 \r
2834 #ifndef FEATURE_SEC_PROCESS_INIT\r
2835 #ifdef FEATURE_IXFILESVC\r
2836 \r
2837    tmc_define_tasks_common(_TASK_INFO_P(ix_filesvc), TASK_NODOG_RPT);\r
2838 \r
2839 #endif /* FEATURE_IXFILESVC */\r
2840 \r
2841    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2842 \r
2843 #ifdef FEATURE_IXSQLSVC\r
2844 \r
2845    tmc_define_tasks_common(_TASK_INFO_P(ix_sqlclnt), TASK_NODOG_RPT);\r
2846 \r
2847    tmc_define_tasks_common(_TASK_INFO_P(ix_sqlsvc), TASK_NODOG_RPT);\r
2848 \r
2849 #endif /* FEATURE_IXSQLSVC */\r
2850 #endif /* !FEATURE_SEC_PROCESS_INIT */\r
2851 \r
2852    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2853 \r
2854 #ifdef FEATURE_NV\r
2855 \r
2856    tmc_define_tasks_common(_TASK_INFO_P(nv), DOG_NV_RPT);\r
2857 \r
2858 #endif /* FEATURE_NV */\r
2859 \r
2860    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2861 \r
2862 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2863 #ifdef TMC_1X\r
2864 \r
2865    tmc_define_tasks_common(_TASK_INFO_P(tx), DOG_TX_RPT);\r
2866 \r
2867    tmc_define_tasks_common(_TASK_INFO_P(rx), DOG_RX_RPT);\r
2868 \r
2869    tmc_define_tasks_common(_TASK_INFO_P(srch), DOG_SRCH_RPT);\r
2870 \r
2871    tmc_define_tasks_common(_TASK_INFO_P(rxtx), DOG_RXTX_RPT);\r
2872 \r
2873    tmc_define_tasks_common(_TASK_INFO_P(mc), DOG_MC_RPT);\r
2874 \r
2875 #endif /* TMC_1X */\r
2876 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2877 \r
2878    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2879 \r
2880 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2881 #ifdef FEATURE_CM\r
2882 \r
2883    tmc_define_tasks_common(_TASK_INFO_P(cm), DOG_CM_RPT);\r
2884 \r
2885 #endif /* FEATURE_CM */\r
2886 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2887 \r
2888    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2889 \r
2890 #if !defined(FEATURE_BRINGUP_DIAG_ONLY) && !defined(FEATURE_COREIMG)\r
2891 #ifdef FEATURE_MULTIMODE_ARCH\r
2892 \r
2893    tmc_define_tasks_common(_TASK_INFO_P(mmoc), DOG_MMOC_RPT);\r
2894 \r
2895 #endif /* FEATURE_MULTIMODE_ARCH */\r
2896 #endif /* FEATURE_BRINGUP_DIAG_ONLY && FETURE_COREIMG */\r
2897 \r
2898    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2899 \r
2900 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2901 #ifdef FEATURE_HDR\r
2902 \r
2903    tmc_define_tasks_common(_TASK_INFO_P(hdrmc), DOG_HDRMC_RPT);\r
2904 \r
2905    tmc_define_tasks_common(_TASK_INFO_P(hdrtx), DOG_HDRTX_RPT);\r
2906 \r
2907    tmc_define_tasks_common(_TASK_INFO_P(hdrrx), DOG_HDRRX_RPT);\r
2908 \r
2909    tmc_define_tasks_common(_TASK_INFO_P(hdrsrch), DOG_HDRSRCH_RPT);\r
2910 \r
2911 #endif /* FEATURE_HDR */\r
2912 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2913 \r
2914 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2915 #ifdef FEATURE_HDR_BCMCS\r
2916 \r
2917    tmc_define_tasks_common(_TASK_INFO_P(hdrbc), DOG_HDRBC_RPT);\r
2918 \r
2919 #endif /* FEATURE_HDR_BCMCS */\r
2920 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2921 \r
2922    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2923 \r
2924 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2925 #if defined( FEATURE_BT ) && !defined(IMAGE_MODEM_PROC)\r
2926 \r
2927    tmc_define_tasks_common(_TASK_INFO_P(bt), DOG_BT_RPT);\r
2928 \r
2929 #ifdef FEATURE_BT_EXTPF\r
2930 \r
2931    tmc_define_tasks_common(_TASK_INFO_P(bt_pf), DOG_BT_PF_RPT);\r
2932 \r
2933 #endif /* FEATURE_BT_EXTPF */\r
2934 \r
2935 #ifdef FEATURE_BT_FS_TASK\r
2936 \r
2937    tmc_define_tasks_common(_TASK_INFO_P(bt_fs), DOG_BT_FS_RPT);\r
2938 \r
2939 #endif /* FEATURE_BT_FS_TASK */\r
2940 \r
2941 #endif /* FEATURE_BT && !IMAGE_MODEM_PROC */\r
2942 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2943 \r
2944    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2945 \r
2946 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
2947 #ifdef FEATURE_FM\r
2948 \r
2949    tmc_define_tasks_common(_TASK_INFO_P(fmrds), TASK_NODOG_RPT);\r
2950 \r
2951 #endif /* FEATURE_FM */\r
2952 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
2953 \r
2954 #ifdef FEATURE_BT_FTM_TASK\r
2955 \r
2956    tmc_define_tasks_common(_TASK_INFO_P(bt_ftm), TASK_NODOG_RPT);\r
2957 \r
2958 #endif /* FEATURE_BT_FTM_TASK */\r
2959 \r
2960    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2961 \r
2962 #ifdef FEATURE_UI\r
2963 \r
2964       tmc_define_tasks_common(_TASK_INFO_P(ui), DOG_UI_RPT);\r
2965 \r
2966 #endif /* FEATURE_UI */\r
2967 \r
2968    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2969 \r
2970 #ifdef FEATURE_NV_CNV\r
2971 \r
2972    tmc_define_tasks_common(_TASK_INFO_P(cnv), DOG_CNV_RPT);\r
2973 #endif /* FEATURE_NV_CNV */\r
2974 \r
2975    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2976 \r
2977 #ifdef FEATURE_DIAG_TASK\r
2978 \r
2979    tmc_define_tasks_common(_TASK_INFO_P(diag), DOG_DIAG_RPT);\r
2980 \r
2981 #ifdef FEATURE_GSM\r
2982    event_report(EVENT_POWERUP);\r
2983 #endif /* FEATURE_GSM */\r
2984 \r
2985 #endif /* FEATURE_DIAG_TASK */\r
2986 \r
2987    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2988 \r
2989 #ifdef FEATURE_IG_QDIAG\r
2990 \r
2991    tmc_define_tasks_common(_TASK_INFO_P(qdiag), DOG_QDIAG_RPT);\r
2992 \r
2993 #endif /* FEATURE_IG_QDIAG */\r
2994 \r
2995    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
2996 \r
2997 #ifdef FEATURE_SEC_PROCESS_INIT\r
2998 \r
2999    tmc_define_tasks_common(_TASK_INFO_P(ix_contentsvc), TASK_NODOG_RPT);\r
3000 \r
3001 #else\r
3002 \r
3003 #ifdef FEATURE_IXHTTPSVC\r
3004 \r
3005    tmc_define_tasks_common(_TASK_INFO_P(ix_httpsvc), DOG_IXHTTPSVC_RPT);\r
3006 \r
3007 #endif /* FEATURE_IXHTTPSVC */\r
3008 \r
3009    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3010 \r
3011 #ifdef FEATURE_IXTIMESVC\r
3012 \r
3013    tmc_define_tasks_common(_TASK_INFO_P(ix_timesvc), TASK_NODOG_RPT);\r
3014 \r
3015 #endif /* FEATURE_IXTIMESVC */\r
3016 \r
3017    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3018 \r
3019 #ifdef FEATURE_IXCONTENTSVC\r
3020 \r
3021    tmc_define_tasks_common(_TASK_INFO_P(ix_contentclnt), TASK_NODOG_RPT);\r
3022 \r
3023    tmc_define_tasks_common(_TASK_INFO_P(ix_contentsvc), TASK_NODOG_RPT);\r
3024 \r
3025 #endif /* FEATURE_IXCONTENTSVC */\r
3026 \r
3027    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3028 \r
3029 #ifdef FEATURE_IXDESCRAMBLERSVC\r
3030 \r
3031    tmc_define_tasks_common(_TASK_INFO_P(ix_descramblersvc), TASK_NODOG_RPT);\r
3032 \r
3033 #endif /* FEATURE_IXDESCRAMBLERSVC */\r
3034 #endif /* FEATURE_SEC_PROCESS_INIT */\r
3035 \r
3036    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3037 \r
3038 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3039 #ifdef FEATURE_SEC\r
3040 #ifndef FEATURE_SEC_PROCESS_INIT\r
3041 \r
3042    tmc_define_tasks_common(_TASK_INFO_P(sec), DOG_SEC_RPT);\r
3043 \r
3044 #ifdef FEATURE_SEC_CONTENT_AGENT\r
3045 \r
3046    tmc_define_tasks_common(_TASK_INFO_P(contentagentdiag), TASK_NODOG_RPT);\r
3047 \r
3048 #endif /* FEATURE_SEC_CONTENT_AGENT */\r
3049 #ifdef FEATURE_SECRND\r
3050 \r
3051    tmc_define_tasks_common(_TASK_INFO_P(secrnd), DOG_SECRND_RPT);\r
3052 \r
3053 #endif /* FEATURE_SECRND */\r
3054 #ifdef FEATURE_SEC_ARM_CRYPTO\r
3055 \r
3056    tmc_define_tasks_common(_TASK_INFO_P(seccryptarm), DOG_SECCRYPTARM_RPT);\r
3057 \r
3058 #endif /* FEATURE_SEC_ARM_CRYPTO */\r
3059 #ifdef FEATURE_SEC_USFS\r
3060 \r
3061    tmc_define_tasks_common(_TASK_INFO_P(sfs), DOG_SFS_RPT);\r
3062 \r
3063 #endif /* FEATURE_SEC_USFS */\r
3064 #endif /* FEATURE_SEC_PROCESS_INIT */\r
3065 #ifdef FEATURE_SSD\r
3066 \r
3067    tmc_define_tasks_common(_TASK_INFO_P(ssd), 0);\r
3068 \r
3069 #endif /* FEATURE_SSD */\r
3070 #ifdef FEATURE_SEC_SSL\r
3071 #ifndef FEATURE_DATA_ON_APPS\r
3072 \r
3073    tmc_define_tasks_common(_TASK_INFO_P(secssl), DOG_SECSSL_RPT);\r
3074 \r
3075 #endif /* !FEATURE_DATA_ON_APPS */\r
3076 #endif /* FEATURE_SEC_SSL */\r
3077 \r
3078 #if defined(FEATURE_SEC_SSL_TESTAPP) || defined(FEATURE_SEC_CRYPT_TESTAPP)\r
3079 \r
3080    tmc_define_tasks_common(_TASK_INFO_P(sectestapp), TASK_NODOG_RPT);\r
3081 \r
3082 #endif /* FEATURE_SEC_SSL_TESTAPP || FEATURE_SEC_CRYPT_TESTAPP */\r
3083 \r
3084 #ifdef FEATURE_SEC_IPSEC\r
3085 \r
3086    tmc_define_tasks_common(_TASK_INFO_P(secips), DOG_SECIPS_RPT);\r
3087 \r
3088 #endif /* FEATURE_SEC_IPSEC */\r
3089 \r
3090    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3091 \r
3092 #ifndef T_RUMI\r
3093 #ifdef FEATURE_SEC_DRM\r
3094 \r
3095    tmc_define_tasks_common(_TASK_INFO_P(secdrm), DOG_SECDRM_RPT);\r
3096 \r
3097 #endif /* FEATURE_SEC_DRM */\r
3098 #endif /* ! T_RUMI */\r
3099 \r
3100    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3101 \r
3102 #endif /* FEATURE_SEC */\r
3103 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3104 \r
3105    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3106 \r
3107 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3108 #ifdef FEATURE_DS_SOCKETS_TEST_TCP\r
3109 #error code not present\r
3110 #endif /* FEATURE_DS_SOCKETS_TEST_TCP */\r
3111 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3112 \r
3113    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3114 \r
3115 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3116 #ifdef FEATURE_DS_SOCKETS_TEST_UDP\r
3117 #error code not present\r
3118 #endif /* FEATURE_DS_SOCKETS_TEST_UDP */\r
3119 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3120 \r
3121    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3122 \r
3123 #if !defined(FEATURE_BRINGUP_DIAG_ONLY) || defined(FEATURE_BRINGUP_MULTIMEDIA_ONLY)\r
3124 #ifdef FEATURE_QMIP\r
3125 #error code not present\r
3126 #endif /* FEATURE_QMIP */\r
3127 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
3128 \r
3129    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3130 \r
3131 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3132 #if defined(FEATURE_AUTH) || defined(FEATURE_RUIM)\r
3133 \r
3134    tmc_define_tasks_common(_TASK_INFO_P(auth), DOG_AUTH_RPT);\r
3135 \r
3136 #endif /*FEATURE_AUTH || FEATURE_RUIM */\r
3137 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3138 \r
3139    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3140 \r
3141 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3142 #if (defined( FEATURE_UIM ) && ! defined(FEATURE_GSM_PLT) )\r
3143 \r
3144    tmc_define_tasks_common(_TASK_INFO_P(uim), DOG_UIM_RPT);\r
3145 \r
3146 #endif /* FEATURE_UIM */\r
3147 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3148 \r
3149    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3150 \r
3151 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3152 #ifdef FEATURE_MMGSDI\r
3153 \r
3154    tmc_define_tasks_common(_TASK_INFO_P(gsdi), DOG_GSDI_RPT);\r
3155 \r
3156 #endif /* FEATURE_MMGSDI */\r
3157 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3158 \r
3159    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3160 \r
3161 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3162 #if defined(FEATURE_GSTK) && defined(FEATURE_VIRTUAL_SAT)\r
3163 \r
3164    tmc_define_tasks_common(_TASK_INFO_P(virtsat), DOG_VIRTSAT_RPT);\r
3165 \r
3166 #endif /* #if defined(FEATURE_GSTK) && defined(FEATURE_VIRTUAL_SAT) */\r
3167 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3168 \r
3169 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3170 #ifdef FEATURE_GSTK\r
3171 \r
3172    tmc_define_tasks_common(_TASK_INFO_P(gstk), DOG_GSTK_RPT);\r
3173 \r
3174 #endif /* FEATURE_GSTK */\r
3175 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3176 \r
3177    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3178 \r
3179 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3180 #ifdef FEATURE_DH\r
3181 \r
3182    tmc_define_tasks_common(_TASK_INFO_P(dh), DOG_DH_RPT);\r
3183 \r
3184 #endif /* FEATURE_DH */\r
3185 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3186 \r
3187    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3188 \r
3189 #if !defined(FEATURE_BRINGUP_DIAG_ONLY) || defined(FEATURE_BRINGUP_MULTIMEDIA_ONLY)\r
3190 #ifdef FEATURE_GRAPH_TASK\r
3191 \r
3192    tmc_define_tasks_common(_TASK_INFO_P(graph), DOG_GRAPH_RPT);\r
3193 \r
3194 #endif /* FEATURE_GRAPH_TASK */\r
3195 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
3196 \r
3197    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3198 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3199 #ifdef FEATURE_GFX_TASK\r
3200 \r
3201    tmc_define_tasks_common(_TASK_INFO_P(gfx), DOG_GFX_RPT);\r
3202 \r
3203 #endif /* FEATURE_GFX_TASK */\r
3204 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3205 \r
3206    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3207 #if !defined(FEATURE_BRINGUP_DIAG_ONLY) || defined(FEATURE_BRINGUP_MULTIMEDIA_ONLY)\r
3208 #ifdef FEATURE_CAMERA_DRV_TASK\r
3209 \r
3210    tmc_define_tasks_common(_TASK_INFO_P(camera_drv), DOG_CAMERA_DRV_RPT);\r
3211 \r
3212 #endif /* FEATURE_CAMERA_DRV_TASK */\r
3213 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
3214    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3215 \r
3216 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3217 #ifdef FEATURE_VS_TASK\r
3218 \r
3219    tmc_define_tasks_common(_TASK_INFO_P(vs), DOG_VS_RPT);\r
3220 \r
3221 #endif /* FEATURE_VS_TASK */\r
3222 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3223 \r
3224    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3225 \r
3226 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3227 #if defined(FEATURE_USB) && !defined(FEATURE_NO_USB_HW_ON_PROCESSOR)\r
3228 \r
3229    tmc_define_tasks_common(_TASK_INFO_P(usbdc), DOG_USBDC_RPT);\r
3230 \r
3231 #ifdef FEATURE_USB_HOST_ENHANCED\r
3232 \r
3233    tmc_define_tasks_common(_TASK_INFO_P(usbhc_urb), DOG_USBHC_URB_RPT);\r
3234 \r
3235    tmc_define_tasks_common(_TASK_INFO_P(usbhc_dev), DOG_USBHC_DEV_RPT);\r
3236 \r
3237 #if defined(FEATURE_USB_HOST_TEST_ENHANCED) && (defined(FEATURE_USB_HOST_MASS_STORAGE_TEST_ENHANCED) || defined(FEATURE_USB_HOST_HID_TEST_ENHANCED))\r
3238 \r
3239    tmc_define_tasks_common(_TASK_INFO_P(usbhc_test), DOG_USBHC_TEST_RPT);\r
3240 \r
3241 #endif\r
3242 \r
3243 #endif /* FEATURE_USB_HOST_ENHANCED */\r
3244 \r
3245 #endif /* FEATURE_USB */\r
3246 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
3247 \r
3248    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3249 \r
3250 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3251 #if (defined(FEATURE_GSM) && !defined(FEATURE_WCDMA_PLT) && !defined(FEATURE_GSM_PLT))\r
3252 \r
3253    tmc_define_tasks_common(_TASK_INFO_P(gsm_l1), DOG_GSM_L1_RPT);\r
3254 \r
3255 #ifndef FEATURE_GSM_PLT\r
3256 \r
3257    tmc_define_tasks_common(_TASK_INFO_P(gsm_l2), DOG_GSM_L2_RPT);\r
3258 \r
3259    tmc_define_tasks_common(_TASK_INFO_P(rr), DOG_RR_RPT);\r
3260 \r
3261 #endif /* !FEATURE_GSM_PLT*/\r
3262 \r
3263 #ifdef FEATURE_GSM_GPRS\r
3264 \r
3265    tmc_define_tasks_common(_TASK_INFO_P(gprs_mac), DOG_GMAC_RPT);\r
3266 \r
3267    tmc_define_tasks_common(_TASK_INFO_P(gprs_rlc_ul), DOG_GRLC_UL_RPT);\r
3268 \r
3269    tmc_define_tasks_common(_TASK_INFO_P(gprs_rlc_dl), DOG_GRLC_DL_RPT);\r
3270 \r
3271    tmc_define_tasks_common(_TASK_INFO_P(gprs_llc), DOG_GLLC_RPT);\r
3272 \r
3273 #endif /* FEATURE_GSM_GPRS */\r
3274 \r
3275 #endif /* FEATURE_GSM && !FEATURE_WCDMA_PLT */\r
3276 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3277 \r
3278    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3279 \r
3280 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3281 #ifdef FEATURE_NAS\r
3282 \r
3283    tmc_define_tasks_common(_TASK_INFO_P(mm), DOG_MM_RPT);\r
3284 \r
3285    tmc_define_tasks_common(_TASK_INFO_P(reg), DOG_REG_RPT);\r
3286 \r
3287    tmc_define_tasks_common(_TASK_INFO_P(mn_cnm), DOG_MN_CNM_RPT);\r
3288 \r
3289    tmc_define_tasks_common(_TASK_INFO_P(sm), DOG_SM_RPT);\r
3290 \r
3291 #ifdef FEATURE_GSM_CB\r
3292 \r
3293    tmc_define_tasks_common(_TASK_INFO_P(cb), DOG_MM_RPT);\r
3294 \r
3295 #endif /* #ifdef FEATURE_GSM_CB */\r
3296 \r
3297 #endif /* FEATURE_NAS */\r
3298 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3299 \r
3300    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3301 \r
3302 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3303 #if ( defined(FEATURE_CDSMS) || defined(FEATURE_GWSMS) )\r
3304 \r
3305    tmc_define_tasks_common(_TASK_INFO_P(wms), DOG_WMS_RPT);\r
3306 \r
3307 #endif /* FEATURE_CDSMS || FEATURE_GWSMS */\r
3308 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3309 \r
3310    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3311 \r
3312 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3313 #ifdef FEATURE_MDSP_TASK\r
3314 \r
3315    tmc_define_tasks_common(_TASK_INFO_P(mdsp), DOG_MDSP_RPT);\r
3316 \r
3317 #endif /* FEATURE_MDSP_TASK */\r
3318 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3319 \r
3320    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3321 \r
3322 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3323 #ifdef FEATURE_TIME_IPC_TASK\r
3324 \r
3325    tmc_define_tasks_common(_TASK_INFO_P(time_ipc), TASK_NODOG_RPT);\r
3326 \r
3327 #endif /* FEATURE_TIME_IPC_TASK */\r
3328 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3329 \r
3330    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3331 \r
3332 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3333 #ifdef FEATURE_VIRTUAL_SIM\r
3334 \r
3335    tmc_define_tasks_common(_TASK_INFO_P(gsdi_uim_server), TASK_NODOG_RPT);\r
3336 \r
3337 #endif /* ifdef FEATURE_VIRTUAL_SIM */\r
3338 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3339 \r
3340 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3341 #ifdef FEATURE_WCDMA\r
3342 #ifndef FEATURE_GSM_PLT\r
3343 \r
3344    tmc_define_tasks_common(_TASK_INFO_P(wcdma_l1), DOG_L1_RPT);\r
3345 \r
3346 #endif\r
3347 \r
3348 #if ( !defined( FEATURE_WCDMA_PLT) && !defined(FEATURE_GSM_PLT) )\r
3349 \r
3350    tmc_define_tasks_common(_TASK_INFO_P(wcdma_l2_ul), DOG_L2UL_RPT);\r
3351 \r
3352    tmc_define_tasks_common(_TASK_INFO_P(wcdma_l2_dl), DOG_L2DL_RPT);\r
3353 \r
3354 #ifdef FEATURE_HSDPA\r
3355 \r
3356    tmc_define_tasks_common(_TASK_INFO_P(wcdma_mac_hs_dl), DOG_MAC_HS_DL_RPT);\r
3357 \r
3358 #endif\r
3359 \r
3360    tmc_define_tasks_common(_TASK_INFO_P(rrc), DOG_RRC_RPT);\r
3361 \r
3362 #endif /* !FEATURE_WCDMA_PLT */\r
3363 #endif /* FEATURE_WCDMA */\r
3364 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3365 \r
3366 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3367 #if ( defined(FEATURE_WCDMA_VST_FULLSTACK) || defined(FEATURE_WCDMA_VST_AS))\r
3368 \r
3369    tmc_define_tasks_common(_TASK_INFO_P(al1), TASK_NODOG_RPT);\r
3370 \r
3371    tmc_define_tasks_common(_TASK_INFO_P(menu), TASK_NODOG_RPT);\r
3372 \r
3373 #endif /* FEATURE_WCDMA_VST_FULLSTACK || FEATURE_WCDMA_VST_AS */\r
3374 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3375 \r
3376 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3377 #ifdef FEATURE_VBATT_TASK\r
3378 \r
3379    tmc_define_tasks_common(_TASK_INFO_P(vbatt), DOG_VBATT_RPT);\r
3380 \r
3381 #endif /* FEATURE_VBATT_TASK */\r
3382 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3383 \r
3384    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3385 #ifdef FEATURE_CTA\r
3386 \r
3387    tmc_define_tasks_common(_TASK_INFO_P(cta), dyn_dog_cta_rpt);\r
3388 \r
3389 #endif /* FEATURE_CTA_TASK */\r
3390 \r
3391 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3392 #ifdef FEATURE_TC\r
3393 \r
3394    tmc_define_tasks_common(_TASK_INFO_P(tc), DOG_TC_RPT);\r
3395 \r
3396 #endif /* FEATURE_TC */\r
3397 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3398 \r
3399 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3400 #ifdef FEATURE_WCDMA_VST_AS\r
3401 \r
3402    tmc_define_tasks_common(_TASK_INFO_P(rrcut), TASK_NODOG_RPT);\r
3403 \r
3404 #endif /*FEATURE_WCDMA_VST_AS*/\r
3405 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3406 \r
3407 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3408 #ifdef FEATURE_WCDMA_PLT /* FEATURE_WPLT_TASK */\r
3409 #error code not present\r
3410 #endif /*FEATURE_WCDMA_PLT*/\r
3411 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3412 \r
3413 #if ! defined(FEATURE_BRINGUP_DIAG_ONLY) || defined(FEATURE_BRINGUP_MULTIMEDIA_ONLY)\r
3414 #ifdef FEATURE_GSM_PLT /* FEATURE_GSM_PLT_TASK */\r
3415 #error code not present\r
3416 #endif /*FEATURE_GSM_PLT*/\r
3417 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
3418 \r
3419    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3420 \r
3421 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3422 #if (defined(FEATURE_WLAN) && !defined(FEATURE_MULTIPROCESSOR))\r
3423 \r
3424    tmc_define_tasks_common(_TASK_INFO_P(wlan_cp), DOG_WLAN_CP_RPT);\r
3425 \r
3426 #endif /* FEATURE_WLAN && !FEATURE_MULTIPROCESSOR */\r
3427 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3428 \r
3429    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3430 \r
3431 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3432 #ifdef FEATURE_DATA\r
3433 #ifndef FEATURE_DATA_ON_APPS\r
3434 #ifdef FEATURE_DATA_PS\r
3435 \r
3436    tmc_define_tasks_common(_TASK_INFO_P(ps), DOG_PS_RPT);\r
3437 \r
3438 #ifdef FEATURE_DATA_PS_DCC\r
3439 \r
3440    tmc_define_tasks_common(_TASK_INFO_P(dcc), DOG_DCC_RPT);\r
3441 \r
3442 #endif /* FEATURE_DATA_PS_DCC */\r
3443 \r
3444 #ifdef FEATURE_DATA_PS_SOCK_REARCH\r
3445 \r
3446    tmc_define_tasks_common(_TASK_INFO_P(ds_sig), TASK_NODOG_RPT);\r
3447 \r
3448 #endif /* FEATURE_DATA_PS_SOCK_REARCH */\r
3449 \r
3450 #ifdef FEATURE_DATA_MUX\r
3451 #error code not present\r
3452 #endif /* FEATURE_DATA_MUX */\r
3453 \r
3454 #endif /* FEATURE_DATA_PS */\r
3455 \r
3456    tmc_define_tasks_common(_TASK_INFO_P(ds), DOG_DS_RPT);\r
3457 \r
3458 #endif /* !FEATURE_DATA_ON_APPS */\r
3459 \r
3460 #if (defined(FEATURE_GAN) && !(defined(IMAGE_APPS_PROC)))\r
3461 #error code not present\r
3462 #endif\r
3463 \r
3464 #ifdef FEATURE_GAN\r
3465 #error code not present\r
3466 #endif /* FEATURE_GAN */\r
3467 \r
3468 #ifdef FEATURE_COMP_TASK\r
3469 \r
3470    tmc_define_tasks_common(_TASK_INFO_P(comp), DOG_COMP_RPT);\r
3471 \r
3472 #endif /* FEATURE_COMP_TASK */\r
3473 \r
3474 #if ( (defined(FEATURE_DATA_GCSD) || defined(FEATURE_DATA_WCDMA_CS)) && !defined(FEATURE_WCDMA_PLT) && !defined(FEATURE_GSM_PLT) )\r
3475 \r
3476    tmc_define_tasks_common(_TASK_INFO_P(Gcsd), DOG_GCSD_RPT);\r
3477 \r
3478 #endif /* (FEATURE_DATA_GCSD || FEATURE_DATA_WCDMA_CS) && !FEATURE_WCDMA_PLT */\r
3479 \r
3480 #ifndef FEATURE_DATA_ON_APPS\r
3481 \r
3482 #ifdef FEATURE_WCDMA /* ) && ( defined FEATURE_DATA_WCDMA_CS ) ) */\r
3483 \r
3484    tmc_define_tasks_common(_TASK_INFO_P(dswcsd_ul), TASK_NODOG_RPT);\r
3485 \r
3486    tmc_define_tasks_common(_TASK_INFO_P(dswcsd_dl), TASK_NODOG_RPT);\r
3487 \r
3488 #endif /* FEATURE_WCDMA */\r
3489 \r
3490 #endif /* !FEATURE_DATA_ON_APPS */\r
3491 \r
3492 #endif /* FEATURE_DATA */\r
3493 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3494 \r
3495    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3496    /* Create WLAN Data Service task  */\r
3497 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3498 #if (defined(FEATURE_WLAN) && !defined(FEATURE_MULTIPROCESSOR))\r
3499 \r
3500    tmc_define_tasks_common(_TASK_INFO_P(wlan_ds), DOG_WLAN_DS_RPT);\r
3501 \r
3502 #endif /* (defined(FEATURE_WLAN) && !defined(FEATURE_MULTIPROCESSOR)) */\r
3503 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3504 \r
3505    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3506 #if ! defined(FEATURE_BRINGUP_DIAG_ONLY) || defined(FEATURE_BRINGUP_MULTIMEDIA_ONLY)\r
3507 #if (defined(FEATURE_WLAN) && !defined(FEATURE_MULTIPROCESSOR))\r
3508 \r
3509    tmc_define_tasks_common(_TASK_INFO_P(wlan_trp), DOG_WLAN_TRP_RPT);\r
3510 \r
3511 #endif /* FEATURE_WLAN && !FEATURE_MULTIPROCESSOR */\r
3512 \r
3513    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3514 \r
3515 #if (defined(FEATURE_WLAN) && !defined(FEATURE_MULTIPROCESSOR))\r
3516 \r
3517    tmc_define_tasks_common(_TASK_INFO_P(wlan_sec), DOG_WLAN_SEC_RPT);\r
3518 \r
3519 #endif /* FEATURE_WLAN && !FEATURE_MULTIPROCESSOR */\r
3520 #endif /* ! FEATURE_BRINGUP_DIAG_ONLY || FEATURE_BRINGUP_MULTIMEDIA_ONLY */\r
3521 \r
3522    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3523 \r
3524 #if (defined(FEATURE_CGPS) && !defined(FEATURE_DISABLE_CGPS))\r
3525 \r
3526    tmc_define_tasks_common(_TASK_INFO_P(mgpmc), DOG_MGPMC_RPT);\r
3527 \r
3528    tmc_define_tasks_common(_TASK_INFO_P(cc), DOG_CC_RPT);\r
3529 \r
3530 #ifdef FEATURE_CGPS_PGI_TASK\r
3531 \r
3532    tmc_define_tasks_common(_TASK_INFO_P(pgi), DOG_PGI_RPT);\r
3533 \r
3534 #endif /* FEATURE_CGPS_PGI_TASK */\r
3535 \r
3536    tmc_define_tasks_common(_TASK_INFO_P(pp), DOG_PP_RPT);\r
3537 \r
3538    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3539 \r
3540 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3541 #ifdef FEATURE_XO\r
3542 \r
3543    tmc_define_tasks_common(_TASK_INFO_P(tcxomgr), DOG_TCXOMGR_RPT);\r
3544 \r
3545 #endif /* FEATURE_XO */\r
3546 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3547 \r
3548    /* ---------------------------------------------------------------------- */\r
3549 \r
3550    tmc_define_tasks_common(_TASK_INFO_P(cd), DOG_CD_RPT);\r
3551 \r
3552    tmc_define_tasks_common(_TASK_INFO_P(nf), DOG_NF_RPT);\r
3553 \r
3554    tmc_define_tasks_common(_TASK_INFO_P(gps_fs), TASK_NODOG_RPT);\r
3555 \r
3556    tmc_define_tasks_common(_TASK_INFO_P(gpsfft), DOG_GPSFFT_RPT);\r
3557 \r
3558    tmc_define_tasks_common(_TASK_INFO_P(lm), DOG_LM_RPT);\r
3559 \r
3560    tmc_define_tasks_common(_TASK_INFO_P(sm_tm), DOG_SM_TM_RPT);\r
3561 \r
3562 #ifdef FEATURE_CGPS_PD_COMMS_TCP_ON_MODEM\r
3563 \r
3564    tmc_define_tasks_common(_TASK_INFO_P(pdcommtcp), DOG_PDCOMMTCP_RPT);\r
3565 \r
3566 #endif /* !FEATURE_DATA_ON_APPS */\r
3567 \r
3568    tmc_define_tasks_common(_TASK_INFO_P(pdcommwms), DOG_PDCOMMWMS_RPT);\r
3569 \r
3570 #ifdef FEATURE_CGPS_LOC_MIDDLEWARE\r
3571 \r
3572    tmc_define_tasks_common(_TASK_INFO_P(loc_middleware), DOG_LOC_MIDDLEWARE_RPT);\r
3573 \r
3574 #endif // FEATURE_CGPS_LOC_MIDDLEWARE\r
3575 \r
3576 #endif /* FEATURE_CGPS */\r
3577 \r
3578    /*- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/\r
3579 \r
3580 #ifndef FEATURE_BRINGUP_DIAG_ONLY\r
3581 #ifdef FEATURE_FTM_TASK\r
3582 \r
3583    tmc_define_tasks_common(_TASK_INFO_P(ftm), DOG_FTM_RPT);\r
3584 \r
3585 #endif /* FEATURE_FTM_TASK */\r
3586 #endif /* FEATURE_BRINGUP_DIAG_ONLY */\r
3587 \r