1 /******************************************************************************
3 ** FILE NAME : ifxmips_ptm_common.h
9 ** DESCRIPTION : PTM driver header file (common definitions)
10 ** COPYRIGHT : Copyright (c) 2006
11 ** Infineon Technologies AG
12 ** Am Campeon 1-12, 85579 Neubiberg, Germany
14 ** This program is free software; you can redistribute it and/or modify
15 ** it under the terms of the GNU General Public License as published by
16 ** the Free Software Foundation; either version 2 of the License, or
17 ** (at your option) any later version.
20 ** $Date $Author $Comment
21 ** 17 JUN 2009 Xu Liang Init Version
22 *******************************************************************************/
24 #ifndef IFXMIPS_PTM_COMMON_H
25 #define IFXMIPS_PTM_COMMON_H
30 * ####################################
32 * ####################################
35 #define IFX_PTM_VER_MAJOR 1
36 #define IFX_PTM_VER_MID 0
37 #define IFX_PTM_VER_MINOR 27
42 * ####################################
44 * ####################################
51 #define ENABLE_DEBUG 1
53 #define ENABLE_ASSERT 1
57 #define DEBUG_DUMP_SKB 1
61 #define ENABLE_DBG_PROC 0
63 #define ENABLE_FW_PROC 1
65 #if defined(CONFIG_DSL_MEI_CPE_DRV) && !defined(CONFIG_IFXMIPS_DSL_CPE_MEI)
66 #define CONFIG_IFXMIPS_DSL_CPE_MEI 1
70 * Debug/Assert/Error Message
73 #define DBG_ENABLE_MASK_ERR (1 << 0)
74 #define DBG_ENABLE_MASK_DEBUG_PRINT (1 << 1)
75 #define DBG_ENABLE_MASK_ASSERT (1 << 2)
76 #define DBG_ENABLE_MASK_DUMP_SKB_RX (1 << 8)
77 #define DBG_ENABLE_MASK_DUMP_SKB_TX (1 << 9)
78 #define DBG_ENABLE_MASK_DUMP_QOS (1 << 10)
79 #define DBG_ENABLE_MASK_DUMP_INIT (1 << 11)
80 #define DBG_ENABLE_MASK_MAC_SWAP (1 << 12)
81 #define DBG_ENABLE_MASK_ALL (DBG_ENABLE_MASK_ERR | DBG_ENABLE_MASK_DEBUG_PRINT | DBG_ENABLE_MASK_ASSERT | DBG_ENABLE_MASK_DUMP_SKB_RX | DBG_ENABLE_MASK_DUMP_SKB_TX | DBG_ENABLE_MASK_DUMP_QOS | DBG_ENABLE_MASK_DUMP_INIT | DBG_ENABLE_MASK_MAC_SWAP)
83 #define err(format, arg...) do { if ( (ifx_ptm_dbg_enable & DBG_ENABLE_MASK_ERR) ) printk(KERN_ERR __FILE__ ":%d:%s: " format "\n", __LINE__, __FUNCTION__, ##arg); } while ( 0 )
85 #if defined(ENABLE_DEBUG) && ENABLE_DEBUG
87 #define dbg(format, arg...) do { if ( (ifx_ptm_dbg_enable & DBG_ENABLE_MASK_DEBUG_PRINT) ) printk(KERN_WARNING __FILE__ ":%d:%s: " format "\n", __LINE__, __FUNCTION__, ##arg); } while ( 0 )
90 #define dbg(format, arg...)
94 #if defined(ENABLE_ASSERT) && ENABLE_ASSERT
95 #define ASSERT(cond, format, arg...) do { if ( (ifx_ptm_dbg_enable & DBG_ENABLE_MASK_ASSERT) && !(cond) ) printk(KERN_ERR __FILE__ ":%d:%s: " format "\n", __LINE__, __FUNCTION__, ##arg); } while ( 0 )
97 #define ASSERT(cond, format, arg...)
102 #endif // IFXMIPS_PTM_COMMON_H