blob: a21f9d2b9dee606ffa933d8d597865448990ad6d [file] [log] [blame]
yu.dongc33b3072024-08-21 23:14:49 -07001/*******************************************************************************
2* Modification Notice:
3* --------------------------
4* This software is modified by MediaTek Inc. and the information contained
5* herein is confidential. The software may not be copied and the information
6* contained herein may not be used or disclosed except with the written
7* permission of MediaTek Inc. (C) 2005
8*
9* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
10* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
11* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
12* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
13* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
14* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
15* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
16* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
17* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
18* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
19* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
20* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
21*
22* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
23* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
24* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
25* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
26* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
27*
28* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
29* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
30* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
31* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
32* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
33*
34*******************************************************************************/
35
36
37 /*******************************************************************************
38 * Filename:
39 * ---------
40 * l1_tool.h
41 *
42 * Project:
43 * --------
44 * Maui_Software
45 *
46 * Description:
47 * ------------
48 * Layer1 core global tools
49 *
50 * Author:
51 * -------
52 * -------
53 * -------
54 *
55 *------------------------------------------------------------------------------
56 * $Revision: 1.11 $
57 * $Modtime: Jul 19 2005 17:19:28 $
58 * $Log: //mtkvs01/vmdata/Maui_sw/archives/mcu/l1/common/l1_tool.h-arc $
59 *
60 * 06 04 2018 priyanshi.jain
61 * [MOLY00330249] ELT????-???? GSM?????? SNR?
62 *
63 * UMOLYE Real SNR
64 *
65 * 12 18 2015 terence.chen
66 * [MOLY00153957] [UMOLY] Sync code from LR11 to UMOLY
67 * Sync GL1A/C and RTB code from LR11.
68 *
69 * 12 04 2014 rick.wu
70 * [MOLY00083549] [MT6291] Merge GL1 codes from MT6291_DEV to UMOLY
71 * Fix build error
72 *
73 * 05 23 2014 rick.wu
74 * [MOLY00063424] [TK6291][L1S][GL1AC] U3G code check in for L1S load
75 * .
76 *
77 * 01 23 2014 rick.wu
78 * [MOLY00054324] [4G Gemini][Merge] MOLY.MM.GEMINI.DEV Merge back to MOLY
79 * .
80 *
81 * 01 22 2014 hsin-chun.chen
82 * [MOLY00054353] Mapping GAS_n to GL1_n in SGLTE and SGLTE DSDS in accordance with MM.GEMINI check in
83 * <saved by Perforce>
84 *
85 * 03 19 2012 william.lin
86 * removed!
87 * .
88 *
89 * 03 13 2012 william.lin
90 * removed!
91 * .
92 *
93 * 03 12 2012 william.lin
94 * removed!
95 * .
96 *
97 * 01 17 2012 william.lin
98 * removed!
99 * .
100 *
101 * 06 08 2011 samuel.yang
102 * removed!
103 * .
104 *
105 * 06 08 2011 jp.lien
106 * removed!
107 * .
108 *
109 * 04 12 2011 sy.yeh
110 * removed!
111 * .
112 *
113 * 02 07 2011 yr.chiang
114 * removed!
115 * .
116 *
117 * 12 15 2010 jp.lien
118 * removed!
119 * .
120 *
121 * 12 15 2010 chang-kuan.lin
122 * removed!
123 * .
124 *
125 * 08 08 2010 yr.chiang
126 * removed!
127 * .
128 *
129 * removed!
130 * removed!
131 *
132 *
133 * removed!
134 * removed!
135 * Fix L1D build warnings for RVCT31
136 *
137 * removed!
138 * removed!
139 *
140 *
141 * removed!
142 * removed!
143 *
144 *
145 * removed!
146 * removed!
147 * For L1D code revision
148 *
149 * removed!
150 * removed!
151 *
152 *
153 * removed!
154 * removed!
155 *
156 *
157 * removed!
158 * removed!
159 * add to source control recursely
160 *
161 * removed!
162 * removed!
163 * Seperate l1_tool.h to l1_tool.h + tool.h
164 *
165 * removed!
166 * removed!
167 *
168 *
169 * removed!
170 * removed!
171 * Checkin L1C dual mode source codes
172 *
173 * removed!
174 * removed!
175 *
176 *
177 * Rev 1.11 Jul 19 2005 17:24:20 mtk00674
178 * Fix compile error in simulation for AMR to add MT6228 / MT6227 compile option
179 * Resolution for 12011: [L1C][update] For AMR simulation tp add MT6228 / MT6227 compile option
180 *
181 * Rev 1.10 May 17 2005 00:33:12 BM_Trunk
182 * Karlos:
183 * add copyright and disclaimer statement
184 *
185 * Rev 1.9 Jan 26 2005 17:47:16 mtk00248
186 * Add ScanInt8 and ScanInt8Range.
187 *
188 * Rev 1.8 Jan 18 2005 00:37:12 BM
189 * append new line in W05.04
190 *
191 * Rev 1.7 May 03 2004 17:41:38 mtk00474
192 * Reason:
193 * for L1A simulation environment
194 * Solution:
195 * Add ASSERT before kal_mem_cpy to avoid copy the non-sense freq. list members to L1C
196 * Sync. some parameters of some sub-routines of simulated-files to real files.
197 * Verify:
198 * Run the simulation tool
199 *
200 * Resolution for 5259: update L1A simulation environment
201 *
202 * Rev 1.6 May 22 2003 17:25:56 mtk00274
203 * Add L1_PowerAveragerPutPt to calculate one second running average in packet transfer mode.
204 * Resolution for 1606: [L1C][Update]Add TA value debug code on PTCCH channel handler.
205 *
206 * Rev 1.5 05 Mar 2003 14:42:42 mtk00276
207 * Not to use "__HW_DIVIDER__" compile option.
208 * Resolution for 1125: Dividers checkin
209 *
210 * Rev 1.4 03 Mar 2003 17:52:48 mtk00276
211 * Divider checkin
212 * Resolution for 1125: Dividers checkin
213 *
214 * Rev 1.3 03 Mar 2003 17:26:04 mtk00276
215 * Divider checkin
216 * Resolution for 1125: Dividers checkin
217 *
218 * Rev 1.2 03 Mar 2003 17:23:08 mtk00276
219 * Divider checkin.
220 * Resolution for 1125: Dividers checkin
221 *
222 * Rev 1.1 28 Jan 2003 10:54:06 mtk00276
223 * Add check SIM function for turbo sleep mode and smart HO mechanism. If test SIM presents(or SIM type unknown), we
224 * shall disable turbo sleep mode(not to delay report handling),
225 * and shall not enable smart HO mechanism.
226 * Resolution for 774: Add check SIM function for turbo sleep mode and smart HO mechanism
227 *
228 * Rev 1.0 Nov 30 2002 19:50:14 admin
229 * Initial revision.
230 *
231 * Rev 1.2 20 Sep 2002 14:54:48 mtk00248
232 * Add compile option to the following code:
233 * void ConsolePrintf( const char* format, ... );
234 * void ConsoleVPrintf( const char* format, va_list args );
235 * void ConsoleFlush( void );
236 * void ConsolePutchar( char c );
237 *
238 * Rev 1.1 11 Sep 2002 16:02:08 mtk00274
239 * Merge Albert's code.
240 *
241 * Rev 1.0 Sep 06 2002 11:18:58 admin
242 * Initial revision.
243 *
244 * Rev 1.5 Jul 04 2002 23:35:00 mtk00210
245 * Enhance L1 assert and display message on LCD on target environment
246 *
247 * Rev 1.4 Apr 29 2002 08:58:28 mtk00274
248 * Send ReportReportPeriodDone when first PCH is received to resolve GSM11.10 test case 20.6
249 *
250 * Rev 1.3 Jan 24 2002 15:21:12 mtk00274
251 * Fix the data type of L1_PowerAveragerGet() from int16 to int32
252 *
253 * Rev 1.2 Jan 03 2002 11:52:26 mtk00210
254 * merge the branch B.L1.20011225
255 *
256 * Rev 1.1.1.1 Dec 27 2001 10:52:48 mtk00210
257 * correct author
258 *
259 * Rev 1.1.1.0 Dec 25 2001 16:40:20 mtk00210
260 * revise L1 for RSSI, multiband AFC, new L1D/L1C interface,
261 * and new CBCH handler
262 *
263 * Rev 1.1 Dec 21 2001 12:17:42 admin
264 * add copyright
265 *
266 *
267 *******************************************************************************/
268
269/******************************************************************************
270 *
271 * File: /MTKteam/source/gprsmtk/l1/generic/SCCS/s.l1_tool.h
272 * -----
273 *
274 * SCCS Version: 2.14
275 * -------------
276 *
277 * Copyright Statement:
278 * --------------------
279 * This software is protected by Copyright and the information contained
280 * herein is confidential. The software may not be copied and the information
281 * contained herein may not be used or disclosed except with the written
282 * permission of Communications Consultants Worldwide Limited (C) 2001
283 *
284 * Project:
285 * --------
286 *
287 * Software Unit: Layer1 core global tools.
288 * --------------
289 *
290 * Description:
291 * ------------
292 *
293 *
294 * Modification History:
295 * ---------------------
296 * Date Vers Auth Details
297 * ---- ---- ---- -------
298 * 28-Mar-01 2.1 VKL Initial version
299 * 17-Apr-01 2.2 VKL added L1_FrameNumberMod52 and L1_FrameNumberDiv
300 * 25-Apr-01 2.3 APB Add PromoteScriptHandler()
301 * 27-Apr-01 2.4 VKL Moved ring buffer handling from
302 * generic/l1_core_private.h to generic/l1_tool.h
303 * Moved hardware read and write macros from
304 * simulation/generic/simul_public.h to
305 * generic/l1_tool.h
306 * Fixed L1_FrameNumberDiv1326()
307 * 01-May-01 2.5 VKL Simplify RB_COUNT
308 * 21-May-01 2.6 VKL added L1_FrameNumberDiv52
309 * 1-May-01 2.7 APB Add ScanPrintChk() reference
310 * 15-Jul-01 2.8 VKL Added L1_FrameNumberMod104()
311 * 21-Sep-01 2.9 VKL Added RB_PEEK and RB_CONSUME
312 * 1-Oct-01 2.10 SGB Fix merge error
313 * 1-Oct-01 2.11 VKL Add ScanTSC()
314 * 11-Oct-01 2.12 SY Add ScanUlTxPower()
315 * 12-Oct-01 2.13 SGB Fix merge error
316 * 26-Oct-01 2.14 VKL Add power averager
317 * 9-Nov-01 2.15 APB Add TRACEC7 - 11
318 * 9-Nov-01 2.16 VKL Add L1_PowerAveragerAverageWithLast()
319 * 15-Nov-01 2.17 APB Add ScanEOL
320 * 04-Dec-01 2.18 VKL Make rinbuffer members volatile
321 * Fix non simulated HW_WRITE and HW_READ
322 *
323 *****************************************************************************/
324
325#ifndef l1_generic_l1_tool_h
326#define l1_generic_l1_tool_h
327
328//#include "divider_public.h" Remove from U3G
329#include "mph_types.h"
330#include "l1_types.h"
331#include "l1_types_public.h"
332#include "l1_core_private.h"
333#include "kal_general_types.h"
334
335#include "event_info_utility.h"
336/* --- frame numbers arithmetic -------------------------------------------- */
337
338FrameNumber L1_FrameNumberAdd( FrameNumber a, int32 b );
339FrameNumber L1_FrameNumberSub( FrameNumber a, int32 b );
340int32 L1_FrameNumberDiff( FrameNumber a, FrameNumber b );
341
342#define L1_FrameNumberMod(a,b) ((intx)((a)%(b)))
343#define L1_FrameNumberMod13( a ) ((intx)((a)%13))
344#define L1_FrameNumberMod26( a ) ((intx)((a)%26))
345#define L1_FrameNumberMod51( a ) ((intx)((a)%51))
346#define L1_FrameNumberMod52( a ) ((intx)((a)%52))
347#define L1_FrameNumberMod102( a ) ((intx)((a)%102))
348#define L1_FrameNumberMod104( a ) ((intx)((a)%104))
349
350#define L1_FrameNumberDiv( a, b ) ((a)/(b))
351#define L1_FrameNumberDiv26( a ) ((a)/26)
352#define L1_FrameNumberDiv51( a ) ((a)/51)
353#define L1_FrameNumberDiv52( a ) ((a)/52)
354#define L1_FrameNumberDiv1326( a ) ((a)/1326)
355
356/* --- time arithmetic ----------------------------------------------------- */
357
358void L1_TimeAddWhileEBits( Time* time, intx ebits );
359void L1_TimeAddEBits( Time *time, intx ebits );
360void L1_TimeSubEBits( Time *time, intx ebits );
361void L1_TimeAdd( Time *time, FrameNumber frame, intx ebits );
362void L1_TimeSub( Time *time, FrameNumber frame, intx ebits );
363void L1_TimeNormalise( Time *time );
364bool L1_TimeOutCheck ( uint32 startTime, uint32 duartion );
365/* --- calculation of RLA_C ------------------------------------------------ */
366
367void L1_PowerAveragerReset( PowerAverager *a , SurroundMode mode );
368void L1_PowerAveragerPut( PowerAverager *a, Power power, kal_uint8 min_sample );
369void L1_PowerAveragerPutPt( PowerAverager *a, Power power );
370void L1_PowerAveragerAverageWithLast( PowerAverager *a, Power power );
371void L1_PowerAveragerGet( PowerAverager *a, PowerSum32 *power, kal_uint8 min_sample );
372void L1_SNRAveragerGet(SNRAverager *s,kal_int16 *snr);
373void L1_SNRAveragerPut(SNRAverager *s,kal_int16 snr);
374/* --- Idenify SIM1/SIM2 report -------------------------------------------- */
375
376#if !defined(__GL1_GEMINI__)
377#define GET_SIM_X_FROM_REPORT(_report) (0) /*0->SIM1*/
378#define GET_SIM_X_FROM_HS(hs) (0)
379#else
380#define GET_SIM_X_FROM_REPORT(_report) (uint8)((_report->type & REPORT_SIM_MASK)>> 7) /*0->SIM1, 1->SIM2, 2->SIM3, 3->SIM4 */
381#define GET_SIM_X_FROM_HS(hs) (hs->simIndex)
382#endif
383
384/*For show trace in catcher, SIM1: "[SIM1]xxxx" */
385#define SIM_MODE_STR(_mode) (_mode + 1)
386#define RTB_MODE_STR (L1C_SIM1 + 1)
387#define DEFAULT_SIM_MODE_STR (L1C_SIM1 + 1)
388
389/* --- Dispatch L1C trace message---------------------- */
390#ifdef __GL1_GEMINI__
391#define L1C_MSG_14(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14)\
392 { msg( SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14); }
393
394#define L1C_MSG_13(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13)\
395 { msg( SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13); }
396
397#define L1C_MSG_12(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12)\
398 { msg( SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v12); }
399
400#define L1C_MSG_11(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11)\
401 { msg( SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11); }
402
403#define L1C_MSG_10(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10)\
404 { msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10); }
405
406#define L1C_MSG_9(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9)\
407 { msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7, v8, v9); }
408
409#define L1C_MSG_8(msg, v1, v2, v3, v4, v5, v6, v7, v8)\
410 { msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7, v8); }
411
412#define L1C_MSG_7(msg, v1, v2, v3, v4, v5, v6, v7)\
413 { msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6, v7); }
414
415#define L1C_MSG_6(msg, v1, v2, v3, v4, v5, v6)\
416 { msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5, v6); }
417
418#define L1C_MSG_5(msg, v1, v2, v3, v4, v5)\
419 { msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4, v5); }
420
421#define L1C_MSG_4( msg, v1, v2, v3, v4)\
422 { msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3, v4); }
423
424#define L1C_MSG_3( msg, v1, v2, v3)\
425 { msg(SIM_MODE_STR(l1c_sim_mode), v1, v2, v3); }
426
427#define L1C_MSG_2( msg, v1, v2)\
428 { msg(SIM_MODE_STR(l1c_sim_mode), v1, v2); }
429
430#define L1C_MSG_1( msg, v1)\
431 { msg(SIM_MODE_STR(l1c_sim_mode), v1); }
432
433#define L1C_MSG_0( msg)\
434 { msg(SIM_MODE_STR(l1c_sim_mode)); }
435#else /*__GL1_GEMINI__*/
436#define L1C_MSG_14(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, v14);}
437#define L1C_MSG_13(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13);}
438#define L1C_MSG_12(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12);}
439#define L1C_MSG_11(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11);}
440#define L1C_MSG_10(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7, v8, v9, v10);}
441#define L1C_MSG_9(msg, v1, v2, v3, v4, v5, v6, v7, v8, v9) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7, v8, v9);}
442#define L1C_MSG_8(msg, v1, v2, v3, v4, v5, v6, v7, v8) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7, v8);}
443#define L1C_MSG_7(msg, v1, v2, v3, v4, v5, v6, v7) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6, v7);}
444#define L1C_MSG_6(msg, v1, v2, v3, v4, v5, v6) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5, v6);}
445#define L1C_MSG_5(msg, v1, v2, v3, v4, v5) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4, v5);}
446#define L1C_MSG_4(msg, v1, v2, v3, v4) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3, v4);}
447#define L1C_MSG_3(msg, v1, v2, v3) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2, v3);}
448#define L1C_MSG_2(msg, v1, v2) {msg(SIM_MODE_STR(L1C_SIM1), v1, v2);}
449#define L1C_MSG_1(msg, v1) {msg(SIM_MODE_STR(L1C_SIM1), v1);}
450#define L1C_MSG_0(msg) {msg(SIM_MODE_STR(L1C_SIM1));}
451#endif /*__GL1_GEMINI__*/
452
453/* --- Utility Macro ------------------------------------------------------- */
454
455/*Please be careful about the datatype of the input parameter!! */
456#define L1_CHK_BIT(a, bit) ( (a) & (1 << bit))
457#define L1_SET_BIT(a, bit) ( (a) |= (1 << bit))
458#define L1_CLR_BIT(a, bit) ( (a) &= ~(1 << bit))
459
460/* --- Original stuff move to tool.h for 3G to include---------------------- */
461
462#include "tool.h"
463
464/* --- specialities ------------------------------------------------------- */
465
466bool ScanPrintChk( void );
467bool ScanCommand( const char *value );
468bool ScanPower( Power *power );
469bool ScanTA( TimingAdvance *ta );
470bool ScanTimeSlot( TimeSlot *timeSlot );
471bool ScanARFCN( ARFCN *arfcn );
472bool ScanFrameOffset( FrameNumber *frameOffset );
473bool ScanEBitOffset( intx *ebitOffset );
474bool ScanBSIC( BSIC *bsic );
475bool ScanTSC( TSC *tsc );
476bool ScanFrame( FrameNumber *frame, int32 min );
477bool ScanUlTxPower( Power *power );
478
479/*------------------- L1A ASSERT --------------------------------------*/
480/*[MAUI_03118234] L1 ASSERT Review
481 A. L1A(_EXT)_ASSERT_Reboot: reboot in both MTK internal & customer release
482 (L1A_ASSERT_Reboot will be ignored in slim, L1A_EXT_ASSERT_Reboot will reboot in slim)
483 B. L1A(_EXT)_ASSERT_Bypass_Trace: no reboot, but output warning message in system trace
484 C. L1A(_EXT)_ASSERT_Bypass: reboot in MTK internal, ignore in customer release
485*/
486
487#define L1A_ASSERT_Bypass( st ) (void)0
488#define L1A_ASSERT_Bypass_Trace( st ) if(!(st)) MODEM_WARNING_MESSAGE(0, "[L1A]")
489#define L1A_ASSERT_Reboot( st ) if(!(st)) ASSERT(0)
490#define L1A_EXT_ASSERT_Bypass( st, d1, d2, d3 ) (void)0
491#define L1A_EXT_ASSERT_Bypass_Trace( st, d1, d2, d3 ) if(!(st)) MODEM_WARNING_MESSAGE(0, "[L1A] var1:%d, var2:%d, var3:%d", d1, d2, d3)
492#define L1A_EXT_ASSERT_Reboot( st, d1, d2, d3 ) if(!(st)) EXT_ASSERT(0, d1, d2, d3 )
493
494#ifdef __MTK_INTERNAL__
495 #undef L1A_ASSERT_Bypass
496 #undef L1A_EXT_ASSERT_Bypass
497 #define L1A_ASSERT_Bypass( st ) if(!(st)) ASSERT(0)
498 #define L1A_EXT_ASSERT_Bypass( st, d1, d2, d3 ) if(!(st)) EXT_ASSERT(0, d1, d2, d3 )
499#endif
500
501#ifdef L1_SIM
502 #undef L1A_ASSERT_Bypass_Trace
503 #undef L1A_EXT_ASSERT_Bypass_Trace
504 #define L1A_ASSERT_Bypass_Trace( st ) if(!(st)) ASSERT(0)
505 #define L1A_EXT_ASSERT_Bypass_Trace( st, d1, d2, d3 ) if(!(st)) EXT_ASSERT(0, d1, d2, d3 )
506#endif
507
508#endif // l1_generic_l1_tool_h
509