blob: bac0e70e18c34433d8d8457d231ff02b2740cdb9 [file] [log] [blame]
rjw6c1fd8f2022-11-30 14:33:01 +08001/*****************************************************************************
2* Copyright Statement:
3* --------------------
4* This software is protected by Copyright 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) 2016
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* This Software is the property of VIA Telecom, Inc. and may only be used pursuant to a license from VIA Telecom, Inc.
38*
39* Any unauthorized use inconsistent with the terms of such license is strictly prohibited.
40*
41* Copyright (c) 2007-2010 VIA Telecom, Inc. All rights reserved.
42*
43*************************************************************/
44#ifndef _RMCCSM_H_
45#define _RMCCSM_H_
46/*****************************************************************************
47*
48* FILE NAME : rcpcsm.h
49*
50DESCRIPTION : This file contains function prototypes and other definitions
51* for the RCP CSM component used within RMC task
52*
53*
54* HISTORY :
55* See Log at end of file
56*
57*****************************************************************************/
58
59/*----------------------------------------------------------------------------
60* Include Files
61----------------------------------------------------------------------------*/
62#include "evl1shcsm.h"
63#include "do_rcpapi.h"
64
65/*----------------------------------------------------------------------------
66 Global Defines And Macros
67----------------------------------------------------------------------------*/
68
69
70/*----------------------------------------------------------------------------
71Global Typedefs
72----------------------------------------------------------------------------*/
73
74typedef enum
75{
76 CSM_START_NEW,
77 CSM_START_UPDATE,
78 CSM_START_CANCEL,
79} Evl1shCsmEvtStartTypT;
80
81typedef enum
82{
83 INTRA_CELL,
84 INTER_CELL
85} CsmSoftHOTypeT;
86
87
88typedef struct
89{
90 Evl1ShCsmPhySubtypeT PhySubtype;
91 kal_uint16 DrcLength;
92 kal_uint16 DscLength;
93 kal_uint8 FrameOffset;
94}RcpCsmActiveMsgT;
95
96typedef struct
97{
98 kal_uint32 ResyncFrcCnt;
99 kal_bool ResyncFrcCntValid;
100} RcpCsmHscStopTxMsgT;
101
102
103
104typedef struct
105{
106 kal_uint8 DrcLockValid;
107 kal_uint8 DrcLockPcgFinal[CSM_MAX_ACTIVE_PILOTS];
108}RcpCsmSectorC2IUpdateMsgT;
109
110
111typedef struct
112{
113 kal_uint16 PilotPN;
114 kal_uint8 MACIndex;
115 kal_uint8 DRCCover;
116 kal_uint8 DSC;
117} RcpCsmActiveParamsT;
118
119
120typedef struct
121{
122 kal_uint8 ActiveNum;
123 RcpCsmActiveParamsT ActiveParams[CSM_MAX_ACTIVE_PILOTS];
124}RcpCsmTcaIndMsgT;
125
126
127typedef enum
128{
129 RESUME,
130 NULLCOVER,
131 NULLCOVER_SUSPEND,
132} CsmForceNullCoverT;
133
134
135
136typedef struct
137{
138 kal_int16 TestPn;
139 kal_int8 DRCCover; /* The target DRCCover */
140 kal_int8 DSC; /* The target DSCCover */
141 kal_int8 PcgId; /*The target PcgId*/
142}RcpCsmTestSwtichParamT;
143
144
145/*----------------------------------------------------------------------------
146 Global Data
147----------------------------------------------------------------------------*/
148
149
150/*----------------------------------------------------------------------------
151 Global Function Prototypes
152----------------------------------------------------------------------------*/
153void RcpCsmActiveMsg(RcpCsmActiveMsgT *CsmActiveMsgPtr);
154void RcpCsmDeActiveMsg(void);
155void RcpCsmSectorInfoUpdateMsg(RcpUpdateSectorInfoMsg *CsmSectorInfoPtr);
156void RcpCsmSectorC2IUpdateMsg(RcpCsmSectorC2IUpdateMsgT *CsmSectorC2IInfoPtr);
157void RcpCsmHscPreemptMsg(RcpCsmHscStopTxMsgT *HscStopTxMsgPtr);
158void RcpCsmHscResumeMsg(void);
159void RcpCsmDoneMsg(Evl1CsmDoneMsgT *CsmDoneMsgptr);
160void RcpCsmTxFreezeMsg(void);
161void RcpCsmTxUnfreezeMsg(void);
162void RcpCsmTcaIndMsg(RcpCsmTcaIndMsgT *TcaIndMsgPtr);
163void RcpCsmC2iRdMsg(Evl1CsmC2iRdMsgT *C2iRdMsgPtr);
164void RcpCsmSuspendMsg(void);
165void RcpCsmResumeMsg(void);
166void RcpCsmForceNullCover(module_type SrcMod, CsmForceNullCoverT ForceNullCover);
167kal_bool RcpCsmGetCellSwitchStatus(void);
168kal_uint8 RcpCsmGetC2IHwCounterThreshold(void);
169kal_bool RcpCsmGet1XScheduledWakeupTime(kal_uint64 *time1xWakeupInDOSlots);
170void RcpCsmTestSwich(RcpCsmTestSwtichParamT *RcpCsmTestSwtichParamPtr);
171void RcpCsmPreempTimeUpMsg(void);
172#ifdef __EVL1_EM_MODE__
173void * Evl1EmRcpCsmInfoGet(void);
174#endif
175void RcpCsmInit(kal_bool TcaInit);
176
177/*****************************************************************************
178* End of File
179*****************************************************************************/
180#endif