Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic For Tegra K1, set IE_RX_TIMEOUT (bit 4) in IER re...
details: https://anonhg.NetBSD.org/src/rev/b6804c497458
branches: trunk
changeset: 337964:b6804c497458
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon May 04 22:59:36 2015 +0000
description:
For Tegra K1, set IE_RX_TIMEOUT (bit 4) in IER register. RX_TIMEOUT occurs
when data has been sitting in the Rx FIFO for more than 4 character times
without being read because there is not enough data to reach the trigger
level. With this change, enable FIFO usage for Tegra UARTs.
diffstat:
sys/dev/ic/com.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diffs (80 lines):
diff -r da16a5891a8f -r b6804c497458 sys/dev/ic/com.c
--- a/sys/dev/ic/com.c Mon May 04 21:29:38 2015 +0000
+++ b/sys/dev/ic/com.c Mon May 04 22:59:36 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.335 2015/05/04 20:25:48 macallan Exp $ */
+/* $NetBSD: com.c,v 1.336 2015/05/04 22:59:36 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.335 2015/05/04 20:25:48 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.336 2015/05/04 22:59:36 jmcneill Exp $");
#include "opt_com.h"
#include "opt_ddb.h"
@@ -380,7 +380,8 @@
sc->sc_ier = IER_ERXRDY;
if (sc->sc_type == COM_TYPE_PXA2x0)
sc->sc_ier |= IER_EUART | IER_ERXTOUT;
- if (sc->sc_type == COM_TYPE_INGENIC)
+ if (sc->sc_type == COM_TYPE_INGENIC ||
+ sc->sc_type == COM_TYPE_TEGRA)
sc->sc_ier |= IER_ERXTOUT;
CSR_WRITE_1(&sc->sc_regs, COM_REG_IER, sc->sc_ier);
SET(sc->sc_mcr, MCR_DTR | MCR_RTS);
@@ -466,11 +467,6 @@
SET(sc->sc_hwflags, COM_HW_FIFO);
SET(sc->sc_hwflags, COM_HW_NOIEN);
goto fifodelay;
-
- case COM_TYPE_TEGRA:
- sc->sc_fifolen = 1;
- fifo_msg = "Tegra UART, broken fifo";
- goto fifodelay;
}
sc->sc_fifolen = 1;
@@ -818,7 +814,8 @@
if (ISSET(sc->sc_hwflags, COM_HW_CONSOLE)) {
sc->sc_ier = IER_ERXRDY; /* interrupt on break */
if ((sc->sc_type == COM_TYPE_PXA2x0) ||
- (sc->sc_type == COM_TYPE_INGENIC))
+ (sc->sc_type == COM_TYPE_INGENIC) ||
+ (sc->sc_type == COM_TYPE_TEGRA))
sc->sc_ier |= IER_ERXTOUT;
} else
sc->sc_ier = 0;
@@ -900,7 +897,8 @@
if (sc->sc_type == COM_TYPE_PXA2x0)
sc->sc_ier |= IER_EUART | IER_ERXTOUT;
- else if (sc->sc_type == COM_TYPE_INGENIC)
+ else if (sc->sc_type == COM_TYPE_INGENIC ||
+ sc->sc_type == COM_TYPE_TEGRA)
sc->sc_ier |= IER_ERXTOUT;
CSR_WRITE_1(&sc->sc_regs, COM_REG_IER, sc->sc_ier);
@@ -1909,7 +1907,8 @@
if (sc->sc_type == COM_TYPE_PXA2x0)
SET(sc->sc_ier, IER_ERXTOUT);
#endif
- if (sc->sc_type == COM_TYPE_INGENIC)
+ if (sc->sc_type == COM_TYPE_INGENIC ||
+ sc->sc_type == COM_TYPE_TEGRA)
SET(sc->sc_ier, IER_ERXTOUT);
CSR_WRITE_1(&sc->sc_regs, COM_REG_IER,
@@ -2115,7 +2114,8 @@
CLR(sc->sc_ier, IER_ERXRDY|IER_ERXTOUT);
else
#endif
- if (sc->sc_type == COM_TYPE_INGENIC)
+ if (sc->sc_type == COM_TYPE_INGENIC ||
+ sc->sc_type == COM_TYPE_TEGRA)
CLR(sc->sc_ier,
IER_ERXRDY | IER_ERXTOUT);
else
Home |
Main Index |
Thread Index |
Old Index