From 99b34694906f0f92495f7328e8b287e6bbc0c0e8 Mon Sep 17 00:00:00 2001 From: Daniel Hellstrom Date: Wed, 18 Jun 2014 13:52:07 +0200 Subject: LEON3: console print \r\n instead of \n\r --- c/src/lib/libbsp/sparc/leon3/console/printk_support.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/c/src/lib/libbsp/sparc/leon3/console/printk_support.c b/c/src/lib/libbsp/sparc/leon3/console/printk_support.c index 35fb4b52e5..082e9a530e 100644 --- a/c/src/lib/libbsp/sparc/leon3/console/printk_support.c +++ b/c/src/lib/libbsp/sparc/leon3/console/printk_support.c @@ -94,12 +94,12 @@ send: __asm__ volatile ("nop"::); __asm__ volatile ("nop"::); __asm__ volatile ("nop"::); __asm__ volatile ("nop"::); } - regs->data = (unsigned int) ch; - if ((ch == '\n') && do_cr_on_newline) { - ch = '\r'; + regs->data = (unsigned int) '\r'; + do_cr_on_newline = 0; goto send; } + regs->data = (unsigned int) ch; /* Wait until the character has been sent? */ if (wait_sent) { -- cgit v1.2.3