[U-Boot] [PATCH] debug_uart: output CR along with LF
Tim Chick
Tim.Chick at mediatek.com
Thu Apr 7 19:20:10 CEST 2016
Sorry for top posting. Not in the office at the moment.
Yes, I call debug_uart_init() before I have SDRAM, in lowlevel_init(). I need the debug uart to help me debug lowlevel_init!
Thanks,
Tim
-----Original Message-----
From: Daniel Schwierzeck [mailto:daniel.schwierzeck at gmail.com]
Sent: 07 April 2016 17:48
To: Tim Chick <Tim.Chick at mediatek.com>
Cc: yamada.masahiro at socionext.com; u-boot at lists.denx.de; Simon Glass <sjg at chromium.org>; Stefan Roese <sr at denx.de>
Subject: Re: [U-Boot] [PATCH] debug_uart: output CR along with LF
Hi Tim,
2016-04-04 17:16 GMT+02:00 Tim Chick <Tim.Chick at mediatek.com>:
> Hi Masahiro,
>
> This patch breaks the debug_uart on my MIPS board. It means printascii now uses the stack, and my board does not have a stack when debug_uart_init is called. debug_uart_init calls printascii if DEBUG_UART_ANNOUNCE is defined.
do you call debug_uart_init() in lowlevel_init()?
>
> The patch below fixes it, and keeps your change:
>
> Thanks,
> Tim
>
>
> ---
>
> diff --git a/include/debug_uart.h b/include/debug_uart.h
> index 0d640b9..2980ae6 100644
> --- a/include/debug_uart.h
> +++ b/include/debug_uart.h
> @@ -115,17 +115,23 @@ void printhex8(uint value);
> * Now define some functions - this should be inserted into the serial driver
> */
> #define DEBUG_UART_FUNCS \
> - void printch(int ch) \
> +\
> + static inline void _printch(int ch) \
> { \
> if (ch == '\n') \
> _debug_uart_putc('\r'); \
> _debug_uart_putc(ch); \
> } \
> \
> + void printch(int ch) \
> + { \
> + _printch(ch); \
> + } \
> +\
> void printascii(const char *str) \
> { \
> while (*str) \
> - printch(*str++); \
> + _printch(*str++); \
> } \
> \
> static inline void printhex1(uint digit) \
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
--
- Daniel
More information about the U-Boot
mailing list