summaryrefslogtreecommitdiffstats
path: root/include/debug_ll.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:01:28 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:01:28 +0200
commit49ea877124ad1200a9925cda2636c149fa64ab7e (patch)
tree0ffb596febb0ffedf268622173c8decae8176fe6 /include/debug_ll.h
parent75706b71fea6a5735aa03527544019f3e5ea40fe (diff)
downloadbarebox-49ea877124ad1200a9925cda2636c149fa64ab7e.tar.gz
barebox-49ea877124ad1200a9925cda2636c149fa64ab7e.tar.xz
svn_rev_160
Diffstat (limited to 'include/debug_ll.h')
-rw-r--r--include/debug_ll.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/include/debug_ll.h b/include/debug_ll.h
new file mode 100644
index 0000000000..9985c1d20f
--- /dev/null
+++ b/include/debug_ll.h
@@ -0,0 +1,43 @@
+/* debug_ll.h
+ *
+ * written by Marc Singer
+ * 12 Feb 2005
+ *
+ * Copyright (C) 2005 Marc Singer
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA.
+ *
+ */
+
+#ifndef __INCLUDE_DEBUG_LL_H__
+#define __INCLUDE_DEBUG_LL_H__
+
+#if defined (CONFIG_DEBUG_LL)
+# include <asm/arch/debug_ll.h>
+
+# define PUTHEX_LL(value) ({ unsigned long v = (unsigned long) (value); \
+ int i; unsigned char ch; \
+ for (i = 8; i--; ) {\
+ ch = ((v >> (i*4)) & 0xf);\
+ ch += (ch >= 10) ? 'a' - 10 : '0';\
+ PUTC (ch); }})
+#else
+# define PUTC_LL(c) do {} while (0)
+# define PUTHEX_LL(v) do {} while (0)
+
+#endif
+
+#endif /* __INCLUDE_DEBUG_LL_H__ */