summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-06-10 14:51:38 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-06-17 12:58:33 +0200
commit85febe7b10f24f87761e4cb206c3ade1f727605e (patch)
tree71cce861d9ddc609e728f9fa2d5e57e808843773
parentbsps/leon3: Auto initialization for printk() (diff)
downloadrtems-85febe7b10f24f87761e4cb206c3ade1f727605e.tar.bz2
grlib: Remove NL -> CR in apbuart_outbyte_polled()
This is already done in rtems_putc().
-rw-r--r--bsps/include/grlib/apbuart.h1
-rw-r--r--bsps/riscv/griscv/console/printk_support.c2
-rw-r--r--bsps/shared/grlib/uart/apbuart_cons.c2
-rw-r--r--bsps/shared/grlib/uart/apbuart_polled.c7
-rw-r--r--bsps/shared/grlib/uart/apbuart_termios.c2
-rw-r--r--bsps/sparc/leon3/console/printk_support.c2
6 files changed, 4 insertions, 12 deletions
diff --git a/bsps/include/grlib/apbuart.h b/bsps/include/grlib/apbuart.h
index 2b68808ed5..2ca67b20e8 100644
--- a/bsps/include/grlib/apbuart.h
+++ b/bsps/include/grlib/apbuart.h
@@ -65,7 +65,6 @@ extern "C" {
void apbuart_outbyte_polled(
struct apbuart_regs *regs,
unsigned char ch,
- int do_cr_on_newline,
int wait_sent
);
diff --git a/bsps/riscv/griscv/console/printk_support.c b/bsps/riscv/griscv/console/printk_support.c
index e789924e4f..4c8acd55c5 100644
--- a/bsps/riscv/griscv/console/printk_support.c
+++ b/bsps/riscv/griscv/console/printk_support.c
@@ -100,7 +100,7 @@ static void bsp_out_char(char c)
*/
}
- apbuart_outbyte_polled(grlib_debug_uart, c, 1, 1);
+ apbuart_outbyte_polled(grlib_debug_uart, c, 1);
}
/*
diff --git a/bsps/shared/grlib/uart/apbuart_cons.c b/bsps/shared/grlib/uart/apbuart_cons.c
index e4d026a4cc..e7dda50565 100644
--- a/bsps/shared/grlib/uart/apbuart_cons.c
+++ b/bsps/shared/grlib/uart/apbuart_cons.c
@@ -641,7 +641,7 @@ static void write_polled(
int nwrite = 0;
while (nwrite < len) {
- apbuart_outbyte_polled(uart->regs, *buf++, 0, 0);
+ apbuart_outbyte_polled(uart->regs, *buf++, 0);
nwrite++;
}
}
diff --git a/bsps/shared/grlib/uart/apbuart_polled.c b/bsps/shared/grlib/uart/apbuart_polled.c
index 0fbfbc51ba..948e0966b8 100644
--- a/bsps/shared/grlib/uart/apbuart_polled.c
+++ b/bsps/shared/grlib/uart/apbuart_polled.c
@@ -12,11 +12,9 @@
void apbuart_outbyte_polled(
struct apbuart_regs *regs,
unsigned char ch,
- int do_cr_on_newline,
int wait_sent
)
{
-send:
while ( (regs->status & APBUART_STATUS_TE) == 0 ) {
/* Lower bus utilization while waiting for UART */
__asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
@@ -25,11 +23,6 @@ send:
__asm__ volatile ("nop"::); __asm__ volatile ("nop"::);
}
- if ((ch == '\n') && do_cr_on_newline) {
- regs->data = (unsigned int) '\r';
- do_cr_on_newline = 0;
- goto send;
- }
regs->data = (unsigned int) ch;
/* Wait until the character has been sent? */
diff --git a/bsps/shared/grlib/uart/apbuart_termios.c b/bsps/shared/grlib/uart/apbuart_termios.c
index 81df89c171..5fb69902fe 100644
--- a/bsps/shared/grlib/uart/apbuart_termios.c
+++ b/bsps/shared/grlib/uart/apbuart_termios.c
@@ -78,7 +78,7 @@ static void apbuart_write_polled(
size_t nwrite = 0;
while (nwrite < len) {
- apbuart_outbyte_polled(uart->regs, *buf++, 0, 0);
+ apbuart_outbyte_polled(uart->regs, *buf++, 0);
nwrite++;
}
}
diff --git a/bsps/sparc/leon3/console/printk_support.c b/bsps/sparc/leon3/console/printk_support.c
index d9900856e8..aa05e1cf6f 100644
--- a/bsps/sparc/leon3/console/printk_support.c
+++ b/bsps/sparc/leon3/console/printk_support.c
@@ -34,7 +34,7 @@ static void bsp_debug_uart_discard(char c)
static void bsp_debug_uart_output_char(char c)
{
- apbuart_outbyte_polled(leon3_debug_uart, c, 1, 1);
+ apbuart_outbyte_polled(leon3_debug_uart, c, 1);
}
static int bsp_debug_uart_poll_char(void)