From patchwork Tue Mar 8 09:19:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 63658 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp1916251lbc; Tue, 8 Mar 2016 01:18:55 -0800 (PST) X-Received: by 10.28.55.139 with SMTP id e133mr18082067wma.98.1457428735702; Tue, 08 Mar 2016 01:18:55 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id 143si3268335wml.21.2016.03.08.01.18.55; Tue, 08 Mar 2016 01:18:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 06ADAA768A; Tue, 8 Mar 2016 10:18:55 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZzBJoyAGUtE8; Tue, 8 Mar 2016 10:18:54 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8D13AA7521; Tue, 8 Mar 2016 10:18:54 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C84A5A7521 for ; Tue, 8 Mar 2016 10:18:50 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FAsLS8Tx2RCl for ; Tue, 8 Mar 2016 10:18:50 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg011-v.nifty.com (conuserg011.nifty.com [202.248.44.37]) by theia.denx.de (Postfix) with ESMTPS id 1A372A7514 for ; Tue, 8 Mar 2016 10:18:45 +0100 (CET) Received: from beagle.diag.org (p14090-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.90]) (authenticated) by conuserg011-v.nifty.com with ESMTP id u289IMTZ026405; Tue, 8 Mar 2016 18:18:22 +0900 X-Nifty-SrcIP: [153.142.97.90] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 8 Mar 2016 18:19:10 +0900 Message-Id: <1457428750-28757-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 Subject: [U-Boot] [PATCH] debug_uart: output CR along with LF X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The serial output from the debug UART carries on going far to the right in the console. Signed-off-by: Masahiro Yamada --- include/debug_uart.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/include/debug_uart.h b/include/debug_uart.h index 5d5349b..0d640b9 100644 --- a/include/debug_uart.h +++ b/include/debug_uart.h @@ -117,13 +117,15 @@ void printhex8(uint value); #define DEBUG_UART_FUNCS \ void printch(int ch) \ { \ + if (ch == '\n') \ + _debug_uart_putc('\r'); \ _debug_uart_putc(ch); \ } \ \ void printascii(const char *str) \ { \ while (*str) \ - _debug_uart_putc(*str++); \ + printch(*str++); \ } \ \ static inline void printhex1(uint digit) \