|
@@ -131,11 +131,26 @@ extern void dbg_decolourise ( void );
|
131
|
131
|
extern void dbg_hex_dump_da ( unsigned long dispaddr,
|
132
|
132
|
const void *data, unsigned long len );
|
133
|
133
|
|
134
|
|
-/* Compatibility with existing Makefile */
|
135
|
134
|
#if DEBUG_SYMBOL
|
136
|
|
-#define DBGLVL DEBUG_SYMBOL
|
|
135
|
+#define DBGLVL_MAX DEBUG_SYMBOL
|
|
136
|
+#else
|
|
137
|
+#define DBGLVL_MAX 0
|
|
138
|
+#endif
|
|
139
|
+
|
|
140
|
+/* Allow for selective disabling of enabled debug levels */
|
|
141
|
+#if DBGLVL_MAX
|
|
142
|
+int __debug_disable;
|
|
143
|
+#define DBGLVL ( DBGLVL_MAX & ~__debug_disable )
|
|
144
|
+#define DBG_DISABLE( level ) do { \
|
|
145
|
+ __debug_disable |= ( (level) & DBGLVL_MAX ); \
|
|
146
|
+ } while ( 0 )
|
|
147
|
+#define DBG_ENABLE( level ) do { \
|
|
148
|
+ __debug_disable &= ~( (level) & DBGLVL_MAX ); \
|
|
149
|
+ } while ( 0 )
|
137
|
150
|
#else
|
138
|
151
|
#define DBGLVL 0
|
|
152
|
+#define DBG_DISABLE( level ) do { } while ( 0 )
|
|
153
|
+#define DBG_ENABLE( level ) do { } while ( 0 )
|
139
|
154
|
#endif
|
140
|
155
|
|
141
|
156
|
#define DBGLVL_LOG 1
|