debug_ll.h: add PUTS_LL() function
PATCH 1/2 debug_ll.h: add PUTS_LL() function
Signed-off-by Antony Pavlov <[email protected]>
--- include/debug_ll.h | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
include/debug_ll.h +10 -0
@@ -35,9 +35,19 @@ ch = ((v >> (i*4 )) &0xf );\ ch += (ch >=10 ) ?'a' -10 :'0' ;\ PUTC_LL (ch); }}) + +static __inline__void PUTS_LL (char * str) +{ +while (*str) { +PUTC_LL (*str); + str++; + } +} +#else # define PUTC_LL (c) do {} while (0)# define PUTHEX_LL (v) do {} while (0) +# define PUTS_LL (c) do {} while (0)#endif
Signature · 7 lines
1.7.5.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/2 startup.c: make DEBUG_LL output more useful
Signed-off-by Antony Pavlov <[email protected]>
--- common/startup.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
common/startup.c +5 -1
@@ -134,13 +134,17 @@ void start_barebox (void)for (initcall = __barebox_initcalls_start; initcall < __barebox_initcalls_end; initcall++) { +PUTS_LL ("<<" );PUTHEX_LL (*initcall); -PUTC_LL ('\n' ); result = (*initcall)(); +PUTC_LL ('>' );if (result)hang (); +PUTS_LL (">\r\n" ); } +PUTS_LL ("initcalls done\r\n" ); +display_meminfo ();#ifdef CONFIG_ENV_HANDLING
Signature · 7 lines
1.7.5.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Re: [PATCH 2/2] startup.c: make DEBUG_LL output more useful
Quoted 11 lines · Antony Pavlov
Signed-off-by Antony Pavlov <[email protected]>--- common/startup.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)common/startup.c +0
-0@@ -134,13 +134,17 @@ void start_barebox (void)
common/startup.c void start_barebox (void) · line 143
Quoted 10 lines
common/startup.c +3
-1for (initcall = __barebox_initcalls_start; initcall < __barebox_initcalls_end; initcall++) { +PUTS_LL ("<<" );PUTHEX_LL (*initcall); -PUTC_LL ('\n' ); result = (*initcall)(); +PUTC_LL ('>' );if (result)hang (); +PUTS_LL (">\r\n" );
Looks mostly good. Can we to the \n -> \r\n conversion in PUTS_LL instead?
Sascha
Quoted 16 lines
common/startup.c +2
-0} +PUTS_LL ("initcalls done\r\n" ); +display_meminfo ();#ifdef CONFIG_ENV_HANDLING Signature · 7 lines
1.7.5.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox