Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Fix TX FIFO on Tegra
details: https://anonhg.NetBSD.org/src/rev/9a9a75de8f51
branches: trunk
changeset: 342290:9a9a75de8f51
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon Dec 14 23:57:30 2015 +0000
description:
Fix TX FIFO on Tegra
diffstat:
sys/dev/ic/com.c | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diffs (57 lines):
diff -r a1a0839f15ba -r 9a9a75de8f51 sys/dev/ic/com.c
--- a/sys/dev/ic/com.c Mon Dec 14 23:21:23 2015 +0000
+++ b/sys/dev/ic/com.c Mon Dec 14 23:57:30 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.337 2015/11/02 17:45:13 christos Exp $ */
+/* $NetBSD: com.c,v 1.338 2015/12/14 23:57:30 jmcneill Exp $ */
/*-
* Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.337 2015/11/02 17:45:13 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.338 2015/12/14 23:57:30 jmcneill Exp $");
#include "opt_com.h"
#include "opt_ddb.h"
@@ -467,6 +467,14 @@
SET(sc->sc_hwflags, COM_HW_FIFO);
SET(sc->sc_hwflags, COM_HW_NOIEN);
goto fifodelay;
+
+ case COM_TYPE_TEGRA:
+ sc->sc_fifolen = 8;
+ fifo_msg = "Tegra UART, working fifo";
+ SET(sc->sc_hwflags, COM_HW_FIFO);
+ CSR_WRITE_1(regsp, COM_REG_FIFO,
+ FIFO_ENABLE | FIFO_RCV_RST | FIFO_XMT_RST | FIFO_TRIGGER_1);
+ goto fifodelay;
}
sc->sc_fifolen = 1;
@@ -1468,17 +1476,20 @@
* overflows.
* * Otherwise set it a bit higher.
*/
- if (sc->sc_type == COM_TYPE_HAYESP)
+ if (sc->sc_type == COM_TYPE_HAYESP) {
sc->sc_fifo = FIFO_DMA_MODE | FIFO_ENABLE | FIFO_TRIGGER_8;
- else if (ISSET(sc->sc_hwflags, COM_HW_FIFO)) {
+ } else if (sc->sc_type == COM_TYPE_TEGRA) {
+ sc->sc_fifo = FIFO_ENABLE | FIFO_TRIGGER_1;
+ } else if (ISSET(sc->sc_hwflags, COM_HW_FIFO)) {
if (t->c_ospeed <= 1200)
sc->sc_fifo = FIFO_ENABLE | FIFO_TRIGGER_1;
else if (t->c_ospeed <= 38400)
sc->sc_fifo = FIFO_ENABLE | FIFO_TRIGGER_8;
else
sc->sc_fifo = FIFO_ENABLE | FIFO_TRIGGER_4;
- } else
+ } else {
sc->sc_fifo = 0;
+ }
if (sc->sc_type == COM_TYPE_INGENIC)
sc->sc_fifo |= FIFO_UART_ON;
Home |
Main Index |
Thread Index |
Old Index