diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-03-05 16:51:19 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2017-03-05 16:51:19 +0000 |
commit | fdc703ccccac52c0a8b6e33d6ae58a45d484fe67 (patch) | |
tree | 026e6d37fc405e64e4192f1516c18098d10a385b | |
parent | cc0582ca510ff03b1c330a2f990bc2bccab9c6c4 (diff) |
The current code in exuartcnputc() that tries to make sure the character
written is actually transmitted doesn't seem to work. Instead, wait until
there is room in the TX FIFO before writing the character. This works only
in FIFO mode, but that's how u-boot configures the chip.
ok patrick@
-rw-r--r-- | sys/arch/armv7/exynos/exuart.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/arch/armv7/exynos/exuart.c b/sys/arch/armv7/exynos/exuart.c index 81453164748..2a4077edb9f 100644 --- a/sys/arch/armv7/exynos/exuart.c +++ b/sys/arch/armv7/exynos/exuart.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exuart.c,v 1.7 2016/08/21 06:36:23 jsg Exp $ */ +/* $OpenBSD: exuart.c,v 1.8 2017/03/05 16:51:18 kettenis Exp $ */ /* * Copyright (c) 2005 Dale Rahn <drahn@motorola.com> * @@ -883,12 +883,10 @@ exuartcnputc(dev_t dev, int c) { int s; s = splhigh(); - bus_space_write_1(exuartconsiot, exuartconsioh, EXUART_UTXH, (uint8_t)c); - while((bus_space_read_2(exuartconsiot, exuartconsioh, EXUART_UTRSTAT) & - EXUART_UTRSTAT_TXBEMPTY) != 0 && - (bus_space_read_2(exuartconsiot, exuartconsioh, EXUART_UFSTAT) & - (EXUART_UFSTAT_TX_FIFO_CNT_MASK|EXUART_UFSTAT_TX_FIFO_FULL)) != 0) + while (bus_space_read_4(exuartconsiot, exuartconsioh, EXUART_UFSTAT) & + EXUART_UFSTAT_TX_FIFO_FULL) ; + bus_space_write_1(exuartconsiot, exuartconsioh, EXUART_UTXH, c); splx(s); } |