[Feature][Modem]Update MTK MODEM V1.6 baseline version: MOLY.NR15.R3.MD700.IVT.MP1MR3.MP.V1.6
MTK modem version: MT2735_IVT_MOLY.NR15.R3.MD700.IVT.MP1MR3.MP.V1.6.tar.gz
RF modem version: NA
Change-Id: I45a4c2752fa9d1a618beacd5d40737fb39ab64fb
diff --git a/mcu/protocol/interface/el2/el2_api.h b/mcu/protocol/interface/el2/el2_api.h
new file mode 100644
index 0000000..ff7d105
--- /dev/null
+++ b/mcu/protocol/interface/el2/el2_api.h
@@ -0,0 +1,249 @@
+/*****************************************************************************
+* Copyright Statement:
+* --------------------
+* This software is protected by Copyright and the information contained
+* herein is confidential. The software may not be copied and the information
+* contained herein may not be used or disclosed except with the written
+* permission of MediaTek Inc. (C) 2012
+*
+* BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
+* AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
+* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
+* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
+* NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
+* SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
+* SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
+* THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
+* NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
+* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
+*
+* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
+* LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
+* AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
+* OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
+* MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
+*
+* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
+* WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
+* LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
+* RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
+* THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
+*
+*****************************************************************************/
+
+/*****************************************************************************
+ *
+ * Filename:
+ * ---------
+ * el2_api.h
+ *
+ * Project:
+ * --------
+ * MOLY
+ *
+ * Description:
+ * ------------
+ * prototypes of EL2 export function
+ *
+ * Author:
+ * -------
+ * -------
+ *
+ * ==========================================================================
+ * $Log$
+ *
+ * 01 11 2018 jia-shi.lin
+ * [MOLY00301451] [SMO release][93/95]EL1 relative interface
+ * emac/el1 interface re-arch
+ *
+ * 08 03 2017 wen-jiunn.liu
+ * [MOLY00268551] Task batch scheduling for LTE Low power
+ * [EL2] Task Rescheduling for Low Power Polling Tick Change
+ *
+ * 08 03 2017 wen-jiunn.liu
+ * [MOLY00268551] Task batch scheduling for LTE Low power
+ * [EL2] Task Rescheduling for Low Power Polling Tick Change
+ *
+ * 04 07 2017 steve.kao
+ * [MOLY00230062] [UMOLYA] M-PS related interface changes for UPCM, RATDM, and EPDCP
+ *
+ * [UMOLYA][TRUNK]
+ *
+ * [UPCM][M-PS] Code changes
+ * 1. Duplicating UPCM contexts,
+ * 2. Use protocol_idx in UL/DL callback/ILM interfaces,
+ * 3. Check protocol_idx in LHIF PIT entries,
+ * 4. Fix test mode UL data processing flow,
+ * 5. Allowing test mode on protocol 2/3/4,
+ * 6. Wrap interfaces with RATDM with __MULTIPLE_PS__,
+ *
+ * [EPDCP][L+L] Code changes
+ *
+ * [RATDM][L+L] Code changes
+ *
+ * 09 26 2016 slifer.hsueh
+ * [MOLY00205085] [MT6293][EL2] ERLC source codes integration from DEV to TRUNK
+ * ERLC source codes integration from DEV to TRUNK
+ *
+ * 01 12 2016 kathie.ho
+ * [MOLY00156229] [MT6292] Code sync from MT6291: AuDRX
+ * CodeSync from LR11 (from 2015/09/21~11/15, exclude TSTM, MBMS)PART4
+ * CL 1800644[MT6291]Autonomous DRX
+ *
+ * 09 07 2015 nienteh.hsu
+ * [MOLY00140671] [6292] ERLC code sync from LR11 to UMOLY (August)
+ * .
+ *
+ * 09 04 2015 nienteh.hsu
+ * .
+ *
+ * 09 04 2015 nienteh.hsu
+ * Code sync from LR11 to UMOLY.
+ * CL1542770: DL & UL print SDU raw data.
+ * CL1582626: Fix of DL print SDU raw data.
+ * CL1590595: ERLC build warning fix.
+ * CL1525169: EM HO duration reporting. ERLC-UL part is merged.
+ * CL1546539: Backup SIT head and tail index when copro power off.
+ * CL1564394: Avoid early return in sched_grant_main function and not trigger poll re-TX.
+ * CL1586893: Fix of EM HO duration reporting.
+ *
+ * 12 04 2014 shengyi.ho
+ * [MOLY00083854] [TK6291] eL2 development checkin CR
+ * 1) fix erlc gtest ut case HWB leakage
+ * 2) rename am/um var reset macro with ERLCUL/ERLCDL prefix
+ * 3) fix HWB C-model function of get UL/DL alloc hwb num
+ *
+ * 11 11 2014 yiting.cheng
+ * [MOLY00084042] [UMOLY] merge UMOLY_DEV to UMOLY trunk
+ * .
+ *
+ * 10 27 2014 sh.yang
+ * [MOLY00082211] [MT6291_DEV] EMBMS check-in
+ * embms check-in
+ *
+ * 10 08 2014 shengyi.ho
+ * [MOLY00077592] [TK6291] emac/erlc development check-in - 1) tti bundle/msg3 collide rv setting. 2) sr prohibit check. 3) add emac ut framework for tx req. 4) remove unused function in MT6291
+ * .
+ *
+ * 07 31 2014 yiting.cheng
+ * [MOLY00073830] [MT6291_DEV] check-in MT6291 modification
+ * for fix potential target build error
+ *
+ * 07 30 2014 yiting.cheng
+ * [MOLY00073830] [MT6291_DEV] check-in MT6291 modification
+ * MT6291 modification, using temp interface with EL1
+ *
+ * 01 15 2014 slifer.hsueh
+ * [MOLY00053104] [MT6290E2][NAS RTD][MM][FDD] Assert fail: driver/l2copro/cipher/src/cipher_common.c 196 - L2COPRO
+ * Merge codes related to L2 copro delay power off back to MOLY TRUNK in LTE domain
+ *
+ * 01 09 2014 moja.hsu
+ * [MOLY00052975] Fine tune RAR/EAR 1ms protection to prevent false alarm.
+ * .
+ *
+ * 12 03 2013 timothy.yao
+ * [MOLY00048832] power down/on in EL2 task context and refine the flow
+ * 1. power-off/on L2 copro in EL2 task context.
+ * 2. refine the flow betwwen EL1 & EL2.
+ *
+ * 09 27 2013 steve.kao
+ * [MOLY00039195] [MT6290] [Low Power] LTE L2 copro power down in LTE flight mode
+ * Unshelved from pending changelist '272199':
+ *
+ * Fix link error
+ *
+ * 08 20 2013 mf.jhang
+ * [MOLY00034292] [MT6290E1] Move PHR to SW
+ * Move PHR report to SW
+ *
+ * 07 23 2013 mf.jhang
+ * [MOLY00030911] [MT6290E1][EMAC] EMAC code enhancement
+ * Register UL LMAC error interrupt handler
+ * Update some trace
+ *
+ * 06 10 2013 mf.jhang
+ * [MOLY00025349] [MT6290E1][GCF][MD8430][LTE][TC 7.1.5.4] Assert fail driverl2coprolmacsrcl2lmac_drv.c 268 - L2COPRO
+ * Add EL2 API for DL LMAC handler
+ *
+ * 05 16 2013 moja.hsu
+ * [MOLY00007625] Maintain code
+ * fix edyn compile warning.
+ ****************************************************************************/
+
+/**
+ * @date 2012/1/10
+ */
+
+#ifndef EL2_EXPORT_API
+#define EL2_EXPORT_API
+
+//#include "drv/drv_lmac.h"
+//#include "el1_enum.h"
+#include "kal_public_api.h"
+//#include "el2_def.h"
+#include "lte_time_common.h"
+
+/* EL2 constructor */
+void el2_init();
+
+// EL2 Tick Source Handler
+void el2_tick_source_dispatch_tick();
+
+/* EMAC export API */
+kal_bool emac_drx_is_drx_sleep(); // query whether EMAC DRX sleep or not
+void emac_rcv_ilm(ilm_struct *pIlm); ///< EMAC message handler
+void emac_el2task_rcv_ilm(ilm_struct *p_ilm); ///< EMAC message handler on EL2 task
+void emac_ctrl_data_rcv(); ///< control data receiving handler TO_BE_REMOVE: please use emac_ctrl_data_check().
+void emac_ctrl_data_check(); ///< check DL control swo bits
+void emac_early_protect_cancel_reg(void(*func)(void)); //Register early protect cancel callback
+void emac_rar_protect_cancel_reg(void(*func)(void)); //Register rar protect cancel callback
+#if MBMS_SUPPORT
+void emac_mch_data_check(); ///< check MCH swo bits
+#endif
+
+#if EL2_SBP_ON_AUDRX
+void emac_audrx_rrc_cmd(kal_uint32 time);
+void emac_audrx_nas_cmd(kal_uint32 time);
+void emac_epdcp_audrx_timer_timeout(void);
+void emac_epdcp_audrx_timer_restart(void);
+kal_uint32 emac_audrx_rrc_sleep_report(void);
+#endif
+
+/**
+ * @brief emac_check_rar_protect
+ * Check if we need to RAR 1ms protection.
+ * Prevent False alarm of frame boundary
+ *
+ * @return KAL_TRUE: Need to protection.
+ * KAL_FALSE: No need to do protection.
+ */
+//kal_bool emac_check_rar_protect(void);
+
+/**
+ * @brief emac_check_ear_protect
+ * Check if we need to RAR 1ms protection.
+ * Prevent False alarm of frame boundary
+ *
+ * @param vect SWO bit to indicate which HT contain EAR LCID
+ *
+ * @return KAL_TRUE: Need to protection.
+ * KAL_FALSE: No need to do protection.
+ */
+//kal_bool emac_check_ear_protect(ht_ear_vect *vect);
+kal_int32 _lte_dl_lmac_err_hndlr(kal_uint32 vect, void *ptr); //DL LMAC error interrupt callback
+kal_int32 _lte_ul_lmac_err_hndlr(kal_uint32 vect, void *ptr); //UL LMAC error interrupt callback
+
+/* ERLC export API */
+void erlcul_rcv_ilm(ilm_struct *pIlm); ///< ERLC-UL message handler
+void erlcdl_rcv_ilm(ilm_struct *pIlm); ///< ERLC-DL message handler
+void erlcul_poll(); ///< ERLC-UL polling
+void erlcdl_poll(); ///< ERLC-DL polling
+void erlcul_reset(); ///< ERLC-UL reset
+void erlcdl_reset(); ///< ERLC-DL reset
+
+kal_uint32 erlcul_query_sleep_allow(); ///< ERLC-UL sees if we can sleep copro
+void erlcul_copro_power_down_backup(); ///back up info used when copro power off
+
+#endif