1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 /* 3 * Copyright (C) ASPEED Technology Inc. 4 */ 5 6 #ifndef SWFUNC_H 7 #define SWFUNC_H 8 9 #include <config.h> // for uboot system 10 11 //--------------------------------------------------------- 12 // Program information 13 //--------------------------------------------------------- 14 /* PHY in Normal mode */ 15 #define VER_NAME "Ver 0.77 version @2017/12/20 1310" 16 17 /* ========================================================== */ 18 #define NETESTCMD_MAX_ARGS CONFIG_SYS_MAXARGS 19 20 /* == Step 4:========== Select PHY ================== */ 21 22 /* ======================== Program flow control ======================== */ 23 #define RUN_STEP 5 24 // 1: parameter setup 25 // 2: mdc/mdio pinmux, 26 // 4: Data Initial 27 // 5: ALL 28 29 /* ====================== Switch print debug message ====================== */ 30 //#define DbgPrn_Enable_Debug_pause //[off] 31 //#define DBG_LOG_FUNC_NAME 32 #define DBG_PRINT_ERR_FLAG 0 33 #define DbgPrn_BufAdr 0 34 #define DbgPrn_Bufdat 0 35 #define DbgPrn_BufdatDetail 0 36 #define DbgPrn_PHYRW 0 37 #define DbgPrn_PHYInit 0 38 #define DbgPrn_DumpMACCnt 0 39 #define DbgPrn_Info 0 40 #define DbgPrn_FRAME_LEN 0 41 42 #ifdef DBG_LOG_FUNC_NAME 43 #define nt_log_func_name() \ 44 do{printf("%s\n", __func__); debug_pause();}while(0) 45 #else 46 #define nt_log_func_name(...) 47 #endif 48 /* ============ Enable or Disable Check item of the descriptor ============ */ 49 #define CheckRxOwn 50 #define CheckRxLen 51 #define CheckRxErr 52 #define CheckCRC 53 #define CheckFTL 54 #define CheckRunt 55 // #define CheckOddNibble 56 #define CheckRxFIFOFull 57 58 59 // #define CheckRxbufUNAVA 60 #define CheckRPktLost 61 // #define CheckNPTxbufUNAVA 62 #define CheckTPktLost 63 #define CheckRxBuf 64 //#define CHECK_RX_DATA 65 66 67 /* error mask of the RX descriptor */ 68 #define RXDES_EM_RXERR BIT(18) 69 #define RXDES_EM_CRC BIT(19) 70 #define RXDES_EM_FTL BIT(20) 71 #define RXDES_EM_RUNT BIT(21) 72 #define RXDES_EM_ODD_NB BIT(22) 73 #define RXDES_EM_FIFO_FULL BIT(23) 74 #define RXDES_EM_ALL \ 75 (RXDES_EM_RXERR | RXDES_EM_CRC | RXDES_EM_FTL | RXDES_EM_RUNT | \ 76 RXDES_EM_ODD_NB | RXDES_EM_FIFO_FULL) 77 78 #endif // SWFUNC_H 79