[U-Boot] [PATCH] debug_uart: output CR along with LF

Simon Glass sjg at chromium.org
Fri Apr 22 20:30:39 CEST 2016


Hi Tom,

On 22 April 2016 at 12:19, Tim Chick <Tim.Chick at mediatek.com> wrote:
>
> On 20/04/2016 15:40, Simon Glass wrote:
>> Hi Tim,
>>
>> On 7 April 2016 at 11:20, Tim Chick <Tim.Chick at mediatek.com> wrote:
>>> 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!
>>>> The patch below fixes it, and keeps your change:
>>
>> Yes your patch looks correct to me. I have also used the debug UART
>> without a stack.
>>
> OK. What needs to be done to get it applied?
>
> Shall I submit as a "normal" patch?

Yes, try using patman.

Regards,
Simon

>
> Thanks,
> Tim
>
>
>> Reviewed-by: Simon Glass <sjg at chromium.org>
>>
>>>>
>>>> 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
>>>
>>>
>>>
>
> ************* Email Confidentiality Notice ********************
> The information contained in this e-mail message (including any
> attachments) may be confidential, proprietary, privileged, or otherwise
> exempt from disclosure under applicable laws. It is intended to be
> conveyed only to the designated recipient(s). Any use, dissemination,
> distribution, printing, retaining or copying of this e-mail (including its
> attachments) by unintended recipient(s) is strictly prohibited and may
> be unlawful. If you are not an intended recipient of this e-mail, or believe
> that you have received this e-mail in error, please notify the sender
> immediately (by replying to this e-mail), delete any and all copies of
> this e-mail (including any attachments) from your system, and do not
> disclose the content of this e-mail to any other person. Thank you!


More information about the U-Boot mailing list