summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ozwpan/oztrace.h
diff options
context:
space:
mode:
authorChris Kelly <ckelly@ozmodevices.com>2012-02-20 21:12:35 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-24 09:26:52 -0800
commit066b2229410f2f58fa91baedd22b4dcf048e28dd (patch)
treef2ce1ae3878d72254c6eec9b9e04f38859e09a65 /drivers/staging/ozwpan/oztrace.h
parent56ff32fe1cf24d624ca4a68a409753fb3fd593f6 (diff)
downloadop-kernel-dev-066b2229410f2f58fa91baedd22b4dcf048e28dd.zip
op-kernel-dev-066b2229410f2f58fa91baedd22b4dcf048e28dd.tar.gz
staging: ozwpan: Added debug support
Added tracing facilities and also memory allocation and URB tracking. This is for debugging purposes and is all optional and can be switched out at compile time. Signed-off-by: Chris Kelly <ckelly@ozmodevices.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ozwpan/oztrace.h')
-rw-r--r--drivers/staging/ozwpan/oztrace.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/staging/ozwpan/oztrace.h b/drivers/staging/ozwpan/oztrace.h
new file mode 100644
index 0000000..8293b24
--- /dev/null
+++ b/drivers/staging/ozwpan/oztrace.h
@@ -0,0 +1,35 @@
+/* -----------------------------------------------------------------------------
+ * Copyright (c) 2011 Ozmo Inc
+ * Released under the GNU General Public License Version 2 (GPLv2).
+ * -----------------------------------------------------------------------------
+ */
+#ifndef _OZTRACE_H_
+#define _OZTRACE_H_
+#include "ozconfig.h"
+
+#define TRACE_PREFIX KERN_ALERT "OZWPAN: "
+
+#ifdef WANT_TRACE
+#define oz_trace(...) printk(TRACE_PREFIX __VA_ARGS__)
+#ifdef WANT_VERBOSE_TRACE
+extern unsigned long trace_flags;
+#define oz_trace2(_flag, ...) \
+ do { if (trace_flags & _flag) printk(TRACE_PREFIX __VA_ARGS__); \
+ } while (0)
+#else
+#define oz_trace2(...)
+#endif /* #ifdef WANT_VERBOSE_TRACE */
+#else
+#define oz_trace(...)
+#define oz_trace2(...)
+#endif /* #ifdef WANT_TRACE */
+
+#define OZ_TRACE_STREAM 0x1
+#define OZ_TRACE_URB 0x2
+#define OZ_TRACE_CTRL_DETAIL 0x4
+#define OZ_TRACE_HUB 0x8
+#define OZ_TRACE_RX_FRAMES 0x10
+#define OZ_TRACE_TX_FRAMES 0x20
+
+#endif /* Sentry */
+
OpenPOWER on IntegriCloud