debug_ll: Add some usage comments
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
9fe8679d3b
commit
4845ffaf0f
|
@ -667,6 +667,8 @@ config DEBUG_LL
|
|||
prompt "low level debug messages"
|
||||
help
|
||||
Enable this to get low level debug messages during barebox initialization.
|
||||
This requires SoC specific support. Most SoCs require the debug UART to be
|
||||
initialized by a debugger or first stage bootloader.
|
||||
|
||||
endmenu
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
/* debug_ll.h
|
||||
/*
|
||||
* debug_ll.h
|
||||
*
|
||||
* written by Marc Singer
|
||||
* 12 Feb 2005
|
||||
|
@ -20,6 +21,14 @@
|
|||
#define __INCLUDE_DEBUG_LL_H__
|
||||
|
||||
#if defined (CONFIG_DEBUG_LL)
|
||||
|
||||
/*
|
||||
* mach/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>
|
||||
|
||||
# define PUTHEX_LL(value) ({ unsigned long v = (unsigned long) (value); \
|
||||
|
@ -29,6 +38,11 @@
|
|||
ch += (ch >= 10) ? 'a' - 10 : '0';\
|
||||
PUTC_LL (ch); }})
|
||||
|
||||
/*
|
||||
* 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
|
||||
* don't use it.
|
||||
*/
|
||||
static __inline__ void PUTS_LL(const char * str)
|
||||
{
|
||||
while (*str) {
|
||||
|
|
Loading…
Reference in New Issue