rjw | 6c1fd8f | 2022-11-30 14:33:01 +0800 | [diff] [blame] | 1 | /***************************************************************************** |
| 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) 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 | * tl1_cc_public.h |
| 41 | * |
| 42 | * Project: |
| 43 | * -------- |
| 44 | * UMOLY_Software |
| 45 | * |
| 46 | * Description: |
| 47 | * ------------ |
| 48 | * TL1 cross core interface declare |
| 49 | *****************************************************************************/ |
| 50 | #ifndef _TL1_CC_PUBLIC_H_ |
| 51 | #define _TL1_CC_PUBLIC_H_ |
| 52 | |
| 53 | #include "kal_general_types.h" |
| 54 | |
| 55 | /*=======================================TL1 and DHL sharememory=================================*/ |
| 56 | //gTdSharedRegisterDumpInfo[0]: dump memory num; gTdSharedRegisterDumpInfo[1]: address, gTdSharedRegisterDumpInfo[2]: size; |
| 57 | //gTdSharedRegisterDumpInfo[3]: address, gTdSharedRegisterDumpInfo[4]: size; ........ |
| 58 | //DECLARE_SHARED_ARRAY(kal_uint32, gTdSharedRegisterDumpInfo, 128) |
| 59 | extern kal_uint32 gTdSharedRegisterDumpInfo[128]; |
| 60 | //ONLY L1CORE call this API for set MEM DUMP INFO |
| 61 | #define TL1_SHARED_MEM_DUMP_INFO_TO_PCORE(dump_info_ptr, mem_num) do{\ |
| 62 | volatile kal_uint32 *info_ptr; \ |
| 63 | info_ptr = (volatile kal_uint32 *)SHARED_pARRAY(gTdSharedRegisterDumpInfo); \ |
| 64 | *(volatile kal_uint32 *)info_ptr++ = mem_num; \ |
| 65 | kal_mem_cpy((void *)info_ptr, (void *)dump_info_ptr, (sizeof(kal_uint32)*mem_num*2)); \ |
| 66 | }while(0) |
| 67 | //for DHL call TL1's API do memory dump in PCORE |
| 68 | extern void GetTL1MemoryInfo(kal_uint32 **info, kal_uint16 *count, kal_uint8 *region_config); |
| 69 | extern kal_uint32 GetTL1MemoryAccessType(kal_uint32 mem_addr); |
| 70 | extern void tds_l1_slp_info(kal_uint64 *working_time, kal_uint32 *wakeup_cnt, kal_uint32 *sleep_cnt); |
| 71 | |
| 72 | #if 0 //MACRO API test pass, but no used because TL1 provide function API for DHL call |
| 73 | /* under construction !*/ |
| 74 | /* under construction !*/ |
| 75 | /* under construction !*/ |
| 76 | /* under construction !*/ |
| 77 | /* under construction !*/ |
| 78 | /* under construction !*/ |
| 79 | /* under construction !*/ |
| 80 | /* under construction !*/ |
| 81 | /* under construction !*/ |
| 82 | /* under construction !*/ |
| 83 | /* under construction !*/ |
| 84 | /* under construction !*/ |
| 85 | /* under construction !*/ |
| 86 | /* under construction !*/ |
| 87 | /* under construction !*/ |
| 88 | /* under construction !*/ |
| 89 | /* under construction !*/ |
| 90 | /* under construction !*/ |
| 91 | /* under construction !*/ |
| 92 | /* under construction !*/ |
| 93 | /* under construction !*/ |
| 94 | /* under construction !*/ |
| 95 | /* under construction !*/ |
| 96 | /* under construction !*/ |
| 97 | /* under construction !*/ |
| 98 | /* under construction !*/ |
| 99 | /* under construction !*/ |
| 100 | #endif |
| 101 | /*===============================================================================================*/ |
| 102 | |
| 103 | |
| 104 | /*======================================TDD efuse register for PCORE and L1CORE==================*/ |
| 105 | //efuse register is AP view, efuse_md1_3g_tdd_disable |
| 106 | |
| 107 | |
| 108 | #define TDD_HW_EFUSE_REGISTER (0xA60F0350) //bit13 = 1, Disable 3G TDD(TDD_FEATURE_OFF). MD side efuse register |
| 109 | #define TDD_FEATURE_OFF_BIT (13) |
| 110 | |
| 111 | /*======================================TL1 provide efuse API====================================*/ |
| 112 | #define TL1_READ_REG32(addr) (*(volatile kal_uint32 *)(addr)) |
| 113 | #define TL1_WRITE_REG32(addr, data) ((*(volatile kal_uint32 *)(addr)) = (kal_uint32)(data)) |
| 114 | /* if (TL1_IS_3G_TDD_EXIST() == KAL_TRUE), 3G TDD exist; if (TL1_IS_3G_TDD_EXIST() == KAL_FALSE), 3G TDD no exist; */ |
| 115 | #if defined(__UE_SIMULATOR__) || defined(__DISABLE_TL1__) //UESIM doesn't support 3G TDD, so return 3G TDD no exist |
| 116 | #define TL1_IS_3G_TDD_EXIST() (KAL_FALSE) |
| 117 | #else |
| 118 | //#define TL1_IS_3G_TDD_EXIST() ((((TL1_READ_REG32(TDD_HW_EFUSE_REGISTER) >> TDD_FEATURE_OFF_BIT) & 0x1) == 1) ? (KAL_FALSE) : (KAL_TRUE)) //if 3G TDD Enabled, return KAL_TRUE; if 3G TDD Disabled, return KAL_FALSE; |
| 119 | #define TL1_IS_3G_TDD_EXIST() (KAL_TRUE) |
| 120 | #endif |
| 121 | /*======================================TL1 provide efuse API====================================*/ |
| 122 | #endif //#ifndef _TL1_CC_PUBLIC_H_ |