mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/2] debug_ll.h: add PUTS_LL() function
@ 2011-07-17 18:56 Antony Pavlov
  2011-07-17 18:56 ` [PATCH 2/2] startup.c: make DEBUG_LL output more useful Antony Pavlov
  0 siblings, 1 reply; 3+ messages in thread
From: Antony Pavlov @ 2011-07-17 18:56 UTC (permalink / raw)
  To: barebox

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 include/debug_ll.h |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/include/debug_ll.h b/include/debug_ll.h
index e99ae7d..87aa083 100644
--- a/include/debug_ll.h
+++ b/include/debug_ll.h
@@ -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
 
-- 
1.7.5.4


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] startup.c: make DEBUG_LL output more useful
  2011-07-17 18:56 [PATCH 1/2] debug_ll.h: add PUTS_LL() function Antony Pavlov
@ 2011-07-17 18:56 ` Antony Pavlov
  2011-07-18  6:46   ` Sascha Hauer
  0 siblings, 1 reply; 3+ messages in thread
From: Antony Pavlov @ 2011-07-17 18:56 UTC (permalink / raw)
  To: barebox

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 common/startup.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/common/startup.c b/common/startup.c
index 00bc9a0..f8efa08 100644
--- a/common/startup.c
+++ b/common/startup.c
@@ -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
-- 
1.7.5.4


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/2] startup.c: make DEBUG_LL output more useful
  2011-07-17 18:56 ` [PATCH 2/2] startup.c: make DEBUG_LL output more useful Antony Pavlov
@ 2011-07-18  6:46   ` Sascha Hauer
  0 siblings, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2011-07-18  6:46 UTC (permalink / raw)
  To: Antony Pavlov; +Cc: barebox

On Sun, Jul 17, 2011 at 10:56:25PM +0400, Antony Pavlov wrote:
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
>  common/startup.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
> 
> diff --git a/common/startup.c b/common/startup.c
> index 00bc9a0..f8efa08 100644
> --- a/common/startup.c
> +++ b/common/startup.c
> @@ -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");

Looks mostly good. Can we to the \n -> \r\n conversion in PUTS_LL
instead?

Sascha

>  	}
>  
> +	PUTS_LL("initcalls done\r\n");
> +
>  	display_meminfo();
>  
>  #ifdef CONFIG_ENV_HANDLING
> -- 
> 1.7.5.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-07-18  6:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-17 18:56 [PATCH 1/2] debug_ll.h: add PUTS_LL() function Antony Pavlov
2011-07-17 18:56 ` [PATCH 2/2] startup.c: make DEBUG_LL output more useful Antony Pavlov
2011-07-18  6:46   ` Sascha Hauer

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