mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 15:41:40 +00:00
serial: zynq: Write chars till output fifo is full
Change logic and put char to fifo till there is a space in output fifo. Origin logic was that output fifo needs to be empty. It means only one char was in output queue. Also remove unused ZYNQ_UART_SR_TXEMPTY macro. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
c9a2c47b91
commit
e90d2659e4
1 changed files with 2 additions and 2 deletions
|
@ -15,8 +15,8 @@
|
|||
#include <linux/compiler.h>
|
||||
#include <serial.h>
|
||||
|
||||
#define ZYNQ_UART_SR_TXEMPTY BIT(3) /* TX FIFO empty */
|
||||
#define ZYNQ_UART_SR_TXACTIVE BIT(11) /* TX active */
|
||||
#define ZYNQ_UART_SR_TXFULL BIT(4) /* TX FIFO full */
|
||||
#define ZYNQ_UART_SR_RXEMPTY BIT(1) /* RX FIFO empty */
|
||||
|
||||
#define ZYNQ_UART_CR_TX_EN BIT(4) /* TX enabled */
|
||||
|
@ -93,7 +93,7 @@ static void _uart_zynq_serial_init(struct uart_zynq *regs)
|
|||
|
||||
static int _uart_zynq_serial_putc(struct uart_zynq *regs, const char c)
|
||||
{
|
||||
if (!(readl(®s->channel_sts) & ZYNQ_UART_SR_TXEMPTY))
|
||||
if (readl(®s->channel_sts) & ZYNQ_UART_SR_TXFULL)
|
||||
return -EAGAIN;
|
||||
|
||||
writel(c, ®s->tx_rx_fifo);
|
||||
|
|
Loading…
Reference in a new issue