lantiq: Tune the XWAY subtarget cflags
[openwrt.git] / package / platform / lantiq / ltq-ptm / src / ifxmips_ptm_common.h
1 /******************************************************************************
2 **
3 ** FILE NAME    : ifxmips_ptm_common.h
4 ** PROJECT      : UEIP
5 ** MODULES      : PTM
6 **
7 ** DATE         : 7 Jul 2009
8 ** AUTHOR       : Xu Liang
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
13 **
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.
18 **
19 ** HISTORY
20 ** $Date        $Author         $Comment
21 ** 17 JUN 2009  Xu Liang        Init Version
22 *******************************************************************************/
23
24 #ifndef IFXMIPS_PTM_COMMON_H
25 #define IFXMIPS_PTM_COMMON_H
26
27
28
29 /*
30  * ####################################
31  *              Version No.
32  * ####################################
33  */
34
35 #define IFX_PTM_VER_MAJOR               1
36 #define IFX_PTM_VER_MID                 0
37 #define IFX_PTM_VER_MINOR               27
38
39
40
41 /*
42  * ####################################
43  *              Definition
44  * ####################################
45  */
46
47 /*
48  *  Compile Options
49  */
50
51 #define ENABLE_DEBUG                    1
52
53 #define ENABLE_ASSERT                   1
54
55 #define INLINE
56
57 #define DEBUG_DUMP_SKB                  1
58
59 #define DEBUG_QOS                       1
60
61 #define ENABLE_DBG_PROC                 1
62
63 #define ENABLE_FW_PROC                  1
64
65 #if defined(CONFIG_DSL_MEI_CPE_DRV) && !defined(CONFIG_IFXMIPS_DSL_CPE_MEI)
66   #define CONFIG_IFXMIPS_DSL_CPE_MEI    1
67 #endif
68
69 /*
70  *  Debug/Assert/Error Message
71  */
72
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)
82
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 )
84
85 #if defined(ENABLE_DEBUG) && ENABLE_DEBUG
86   #undef  dbg
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 )
88 #else
89   #if !defined(dbg)
90     #define dbg(format, arg...)
91   #endif
92 #endif
93
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 )
96 #else
97   #define ASSERT(cond, format, arg...)
98 #endif
99
100
101
102 #endif  //  IFXMIPS_PTM_COMMON_H