mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] introduce verbose debug
@ 2014-07-15 13:45 Sascha Hauer
  0 siblings, 0 replies; only message in thread
From: Sascha Hauer @ 2014-07-15 13:45 UTC (permalink / raw)
  To: barebox

During debugging it sometimes helps to me even more verbose. This
adds an additional debug level for this.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 common/Kconfig   | 2 ++
 include/printk.h | 8 +++++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/common/Kconfig b/common/Kconfig
index bba7f15..e7c22e5 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -676,6 +676,7 @@ config COMPILE_LOGLEVEL
 	  5    normal but significant condition (notice)
 	  6    informational (info)
 	  7    debug-level messages (debug)
+	  8    verbose debug messages (vdebug)
 
 config DEFAULT_LOGLEVEL
 	int "default loglevel"
@@ -692,6 +693,7 @@ config DEFAULT_LOGLEVEL
 	  5    normal but significant condition (notice)
 	  6    informational (info)
 	  7    debug-level messages (debug)
+	  8    verbose debug messages (vdebug)
 
 config DEBUG_INFO
 	bool
diff --git a/include/printk.h b/include/printk.h
index f550f07..4543156 100644
--- a/include/printk.h
+++ b/include/printk.h
@@ -9,8 +9,11 @@
 #define MSG_NOTICE     5    /* normal but significant condition */
 #define MSG_INFO       6    /* informational */
 #define MSG_DEBUG      7    /* debug-level messages */
+#define MSG_VDEBUG     8    /* verbose debug messages */
 
-#ifdef DEBUG
+#ifdef VERBOSE_DEBUG
+#define LOGLEVEL	MSG_VDEBUG
+#elif defined DEBUG
 #define LOGLEVEL	MSG_DEBUG
 #else
 #define LOGLEVEL	CONFIG_COMPILE_LOGLEVEL
@@ -46,6 +49,8 @@ int dev_printf(int level, const struct device_d *dev, const char *format, ...)
 	__dev_printf(6, (dev) , format , ## arg)
 #define dev_dbg(dev, format, arg...)		\
 	__dev_printf(7, (dev) , format , ## arg)
+#define dev_vdbg(dev, format, arg...)		\
+	__dev_printf(8, (dev) , format , ## arg)
 
 #define __pr_printk(level, format, args...) \
 	({	\
@@ -65,5 +70,6 @@ int dev_printf(int level, const struct device_d *dev, const char *format, ...)
 #define pr_info(fmt, arg...)	__pr_printk(6, pr_fmt(fmt), ##arg)
 #define pr_debug(fmt, arg...)	__pr_printk(7, pr_fmt(fmt), ##arg)
 #define debug(fmt, arg...)	__pr_printk(7, pr_fmt(fmt), ##arg)
+#define pr_vdebug(fmt, arg...)	__pr_printk(8, pr_fmt(fmt), ##arg)
 
 #endif
-- 
2.0.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-07-15 13:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-15 13:45 [PATCH] introduce verbose debug Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox