diff options
Diffstat (limited to 'include/debug_ll.h')
-rw-r--r-- | include/debug_ll.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/include/debug_ll.h b/include/debug_ll.h index 735033b314..0128ab524a 100644 --- a/include/debug_ll.h +++ b/include/debug_ll.h @@ -12,18 +12,14 @@ #define __INCLUDE_DEBUG_LL_H__ #ifdef CONFIG_HAS_DEBUG_LL -#ifdef CONFIG_HAS_ASM_DEBUG_LL -#include <asm/debug_ll.h> -#else /* - * mach/debug_ll.h should implement PUTC_LL. This can be a macro or a static + * asm/debug_ll.h should implement PUTC_LL. This can be a macro or a static * inline function. Note that several SoCs expect the UART to be initialized * by a debugger or a first stage bootloader. You won't see anything without * this initialization. Depending on the PUTC_LL implementation the board might * also hang in PUTC_LL without proper initialization. */ -#include <mach/debug_ll.h> -#endif +#include <asm/debug_ll.h> #endif #if defined (CONFIG_DEBUG_LL) @@ -33,17 +29,25 @@ static inline void putc_ll(char value) PUTC_LL(value); } -static inline void puthex_ll(unsigned long value) +static inline void puthexc_ll(unsigned char value) { int i; unsigned char ch; - for (i = sizeof(unsigned long) * 2; i--; ) { + for (i = 2; i--; ) { ch = ((value >> (i * 4)) & 0xf); ch += (ch >= 10) ? 'a' - 10 : '0'; putc_ll(ch); } } +static inline void puthex_ll(unsigned long value) +{ + int i; + + for (i = sizeof(unsigned long); i--; ) + puthexc_ll(value >> (i * 8)); +} + /* * Be careful with puts_ll, it only works if the binary is running at the * link address which often is not the case during early startup. If in doubt @@ -66,6 +70,10 @@ static inline void putc_ll(char value) { } +static inline void puthexc_ll(unsigned char value) +{ +} + static inline void puthex_ll(unsigned long value) { } |