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) 2010 |
| 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 | * DrvFlash_UT.C |
| 41 | * |
| 42 | * Project: |
| 43 | * -------- |
| 44 | * MAUI |
| 45 | * |
| 46 | * Description: |
| 47 | * ------------ |
| 48 | * This file is used to configure NOR FDM unit test processure. |
| 49 | * |
| 50 | * Author: |
| 51 | * ------- |
| 52 | * ------- |
| 53 | * |
| 54 | *============================================================================== |
| 55 | * HISTORY |
| 56 | * Below this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| 57 | *------------------------------------------------------------------------------ |
| 58 | * removed! |
| 59 | * removed! |
| 60 | * removed! |
| 61 | * |
| 62 | * removed! |
| 63 | * removed! |
| 64 | * removed! |
| 65 | * |
| 66 | * removed! |
| 67 | * removed! |
| 68 | * removed! |
| 69 | * |
| 70 | * removed! |
| 71 | * removed! |
| 72 | * removed! |
| 73 | * |
| 74 | * removed! |
| 75 | * removed! |
| 76 | Forbidden to use kal_internal_api.h and tst_ltlcom.h in modules other than KAL. |
| 77 | |
| 78 | [Check-in branch] |
| 79 | MAUI |
| 80 | MSBB_II_DEV |
| 81 | |
| 82 | * removed! |
| 83 | * |
| 84 | * removed! |
| 85 | * removed! |
| 86 | * removed! |
| 87 | * |
| 88 | * removed! |
| 89 | * removed! |
| 90 | * removed! |
| 91 | * |
| 92 | * removed! |
| 93 | * removed! |
| 94 | * removed! |
| 95 | * |
| 96 | * removed! |
| 97 | * removed! |
| 98 | * removed! |
| 99 | * |
| 100 | * removed! |
| 101 | * removed! |
| 102 | * removed! |
| 103 | * |
| 104 | * removed! |
| 105 | * removed! |
| 106 | * removed! |
| 107 | * |
| 108 | * removed! |
| 109 | * removed! |
| 110 | * removed! |
| 111 | * |
| 112 | * removed! |
| 113 | * removed! |
| 114 | * removed! |
| 115 | * |
| 116 | * removed! |
| 117 | * removed! |
| 118 | * removed! |
| 119 | * |
| 120 | * removed! |
| 121 | * removed! |
| 122 | * removed! |
| 123 | * removed! |
| 124 | * |
| 125 | * removed! |
| 126 | * removed! |
| 127 | * removed! |
| 128 | * removed! |
| 129 | * removed! |
| 130 | * |
| 131 | * |
| 132 | * |
| 133 | *------------------------------------------------------------------------------ |
| 134 | * Upper this line, this part is controlled by PVCS VM. DO NOT MODIFY!! |
| 135 | *============================================================================== |
| 136 | *******************************************************************************/ |
| 137 | #ifndef DRVFLASH_UT_H |
| 138 | #define DRVFLASH_UT_H |
| 139 | |
| 140 | //---------------------------------------------// |
| 141 | // Included Header Files // |
| 142 | //---------------------------------------------// |
| 143 | |
| 144 | #if defined(__MTK_INTERNAL__) |
| 145 | #include "task_config.h" |
| 146 | #endif //__MTK_INTERNAL__ |
| 147 | |
| 148 | #include "kal_debug.h" |
| 149 | |
| 150 | //---------------------------------------------// |
| 151 | // NOR FDM UT Test Item // |
| 152 | //---------------------------------------------// |
| 153 | typedef enum { |
| 154 | NOR_FDM_UT_RW_STRESS = 0, |
| 155 | NOR_FDM_UT_AUTO, |
| 156 | NOR_FDM_UT_AUTO_16HR, |
| 157 | NOR_FDM_UT_NORMAL_POWER_ON_OFF, |
| 158 | NOR_FDM_UT_RANDOM_POWER_LOSS, |
| 159 | NOR_FDM_UT_BUSY_POWER_LOSS, |
| 160 | NOR_FDM_UT_CFI, |
| 161 | NOR_FDM_UT_PROFILING, |
| 162 | NOR_FDM_UT_ATE, |
| 163 | NOR_FDM_UT_BOOTROM, |
| 164 | NOR_FDM_UT_OTP, |
| 165 | NOR_FDM_UT_API, |
| 166 | NOR_MTD_UT_MEMORY_SLT, |
| 167 | NOR_MTD_UT_DEVICE_TEST |
| 168 | } NOR_FDM_UT_Code; |
| 169 | |
| 170 | |
| 171 | //----------------------------------------------// |
| 172 | // NOR FDM UT Test Variable Declaration // |
| 173 | //----------------------------------------------// |
| 174 | |
| 175 | extern kal_bool nor_fdm_dbg_enable; //declare in nor_test.c |
| 176 | |
| 177 | //------------------------------------------------------- |
| 178 | // NOR Debug Trace Function/Macro |
| 179 | //------------------------------------------------------- |
| 180 | |
| 181 | // NOR_TST_SYS_TRACE |
| 182 | // basic_log |
| 183 | // log_printf |
| 184 | |
| 185 | extern void dbg_print(char *fmt,...); |
| 186 | |
| 187 | // Define Catcher System Trace Macro for Internal Project |
| 188 | // Remove IDLER task trace due to kal_change_priority is deprecated. |
| 189 | #if 0 //defined(__MTK_INTERNAL__) |
| 190 | /* under construction !*/ |
| 191 | /* under construction !*/ |
| 192 | /* under construction !*/ |
| 193 | /* under construction !*/ |
| 194 | /* under construction !*/ |
| 195 | /* under construction !*/ |
| 196 | /* under construction !*/ |
| 197 | /* under construction !*/ |
| 198 | /* under construction !*/ |
| 199 | #else // !__MTK_INTERNAL__ |
| 200 | #define NOR_TST_SYS_TRACE(str, ...) |
| 201 | #endif //__MTK_INTERNAL__ |
| 202 | |
| 203 | |
| 204 | // Define UART Trace Macro |
| 205 | #if defined(LOGGING) |
| 206 | #define basic_log(str, ...) do{\ |
| 207 | kal_sprintf(dbg_text, str, ##__VA_ARGS__);\ |
| 208 | dbg_print(dbg_text);\ |
| 209 | }while(0) |
| 210 | #else |
| 211 | #define basic_log(str, ...) |
| 212 | #endif // LOGGINE || (__NOR_FLASH_HARDWARE_TEST__ && __MAUI_BASIC__) |
| 213 | |
| 214 | // Define UART Trace Macro in Basic Load |
| 215 | #define basic_printf(str, ...) |
| 216 | #define basic_print(str) |
| 217 | |
| 218 | // Define UART Trace Macro if LOGGING is defined |
| 219 | #if defined(LOGGING) |
| 220 | #define log_printf basic_log |
| 221 | #else //!LOGGING |
| 222 | #define log_printf(str, ...) |
| 223 | #endif // LOGGING |
| 224 | |
| 225 | |
| 226 | |
| 227 | |
| 228 | //----------------------------------------------// |
| 229 | // MT6280 NOR FDM AUTO Test Macros // |
| 230 | //----------------------------------------------// |
| 231 | |
| 232 | //MT6280 has no RTC to do AUTO test count. Therefore, numeric counter is written to NV Register to record count. |
| 233 | |
| 234 | |
| 235 | #endif /* !DRVFLASH_UT_H */ |