summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2017-03-05 18:56:58 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2017-03-05 18:56:58 +0000
commit5f952d07e30b25c10bd66edd6154c0ea5eb94152 (patch)
treef0c34c19d1dafc83147f50c4978789a7c445af0e /sys
parentfdc703ccccac52c0a8b6e33d6ae58a45d484fe67 (diff)
Clear pending interrupts and mask them all.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/armv7/exynos/exuart.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/arch/armv7/exynos/exuart.c b/sys/arch/armv7/exynos/exuart.c
index 2a4077edb9f..485063b1d5a 100644
--- a/sys/arch/armv7/exynos/exuart.c
+++ b/sys/arch/armv7/exynos/exuart.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: exuart.c,v 1.8 2017/03/05 16:51:18 kettenis Exp $ */
+/* $OpenBSD: exuart.c,v 1.9 2017/03/05 18:56:57 kettenis Exp $ */
/*
* Copyright (c) 2005 Dale Rahn <drahn@motorola.com>
*
@@ -197,6 +197,14 @@ exuartattach(struct device *parent, struct device *self, void *aux)
printf(": console");
}
+ /* Clear pending interrupts and mask them all. */
+ bus_space_write_4(sc->sc_iot, sc->sc_ioh, EXUART_UINTP,
+ EXUART_UINTP_RXD | EXUART_UINTP_ERROR |
+ EXUART_UINTP_TXD | EXUART_UINTP_MODEM);
+ bus_space_write_4(sc->sc_iot, sc->sc_ioh, EXUART_UINTM,
+ EXUART_UINTM_RXD | EXUART_UINTM_ERROR |
+ EXUART_UINTM_TXD | EXUART_UINTM_MODEM);
+
timeout_set(&sc->sc_diag_tmo, exuart_diag, sc);
timeout_set(&sc->sc_dtr_tmo, exuart_raisedtr, sc);
sc->sc_si = softintr_establish(IPL_TTY, exuart_softint, sc);