blob: c6418e5a822edac3c6d8005b0f70047c5d9f8415 [file] [log] [blame]
/*****************************************************************************
* 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:
* ---------
* ccci_rpc_if.h
*
* Project:
* --------
* MOLY
*
* Description:
* ------------
* Interface of CCCI_RPC service.
*
* Author:
* -------
* -------
*
*
* ==========================================================================
* $Log$
*
* 04 19 2019 actory.ou
* [MOLY00395176] [Thin Modem 1.0][PCIe platform] PCIe Platform 1st Release on Apollo
* [PCIe][OA][CCCI] support pcie thin modem 1.0
*
* 02 17 2014 cs.huang
* [MOLY00056246] [MT6595] [CCCI] Add CCCI RPC general group API
* [CCCI RPC] Add CCCI RPC general query function.
*
* 06 27 2013 ap.wang
* [MOLY00027544] [CCCI RPC] Add CCCI RPC SVC and API
* [CCCI_RPC] Modify for sceurity RPC service
*
* 05 09 2013 ap.wang
* [MOLY00021998] [MT6290 Bring-up][CCCI_IT] CCCI IT related code checkin
* [CCCI RPC] CCCI RPC IT modify and rx callback rule modify
*
* 03 18 2013 vend_brian.chiang
* [MOLY00010750] [CCCI_RPC] new feature check in
* fix compile warning and build error
****************************************************************************/
#ifndef __CCCI_RPC_IF_H__
#define __CCCI_RPC_IF_H__
#include "kal_general_types.h"
/*******************************************************************************
* Define marco or constant.
*******************************************************************************/
/*******************************************************************************
* Define data structures.
*******************************************************************************/
/*******************************************************************************
* RPC op code
*******************************************************************************/
#undef X_CCCI_RPC_CONF
#define X_CCCI_RPC_CONF(OPNAME, OPID, IS_SUPPORT) OPNAME = OPID,
typedef enum
{
#include "ccci_rpc_conf.h"
} IPC_RPC_OP_ID_T;
#undef X_CCCI_RPC_CONF
/*******************************************************************************
* Define macros.
*******************************************************************************/
/*******************************************************************************
* Define export variables.
*******************************************************************************/
/*******************************************************************************
* Declare function prototype.
*******************************************************************************/
/* Function for rpc init*/
kal_bool ccci_rpc_svc_init(void);
kal_bool ccci_rpc_task_main_init(void);
/* RPC service API */
kal_int32 IPC_RPC_Wrapper(IPC_RPC_OP_ID_T rpc_op,...);
/* RPC service function*/
kal_int32 IPC_RPC_Secure_Algo (kal_uint8 Direction, kal_uint32 ContentAddr,
kal_uint32 ContentLen, kal_uint8 *CustomSeed,
kal_uint8 *ResText);
kal_int32 IPC_RPC_Get_Secure_RO(kal_uint8* ResText, kal_uint32 ResLen);
kal_int32 IPC_RPC_EINT_GetNumber(kal_uint8 *EintName, kal_uint32 EintNameLength,
kal_uint32 *EintNo);
kal_int32 IPC_RPC_GPIO_GetPin(kal_uint8 *GPIOName, kal_uint32 GPIONameLength, kal_uint32 *GPIOPin);
kal_int32 IPC_RPC_ADC_GetChannelNumber(kal_uint8 *ChannelName, kal_uint32 ChannelNameLength, kal_uint32 *ChannelNumber);
kal_int32 IPC_RPC_Query_EMI(kal_uint32 *EMIType, kal_uint32 *ClockRate);
#if defined(__SIM_HOT_SWAP_SUPPORT__)
kal_int32 IPC_RPC_EINT_GetAttribute (kal_uint8 *EintName, kal_uint32 EintNameLength, kal_uint32 queryType, void *result, kal_uint32 resultLength);
#endif
kal_int32 IPC_RPC_General_Query (kal_uint32 OPID, void *input, kal_uint32 inputLength,void *result, kal_uint32 resultLength);
#endif /* !__CCCI_RPC_IF_H__ */