diff options
| author | jmcneill <jmcneill@NetBSD.org> | 2021-10-30 11:43:17 +0000 |
|---|---|---|
| committer | jmcneill <jmcneill@NetBSD.org> | 2021-10-30 11:43:17 +0000 |
| commit | 50af335bc66bd7eabbbbd298ac039e48cbfab3a3 (patch) | |
| tree | c2994bd0f0c0f802f04bfdff806a698f2ef38b32 /sys/dev | |
| parent | f000cb62aa1b2a6e740deb588405481ce7dfecc9 (diff) | |
For the DW APB busy bit workaround, only attempt to re-apply LCR and DLB
settings for non-console devices. In the console case, simply clear the
busy bit and continue. Fixes an interrupt storm observed on Macchiatobin.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/com.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ic/com.c b/sys/dev/ic/com.c index b1603e3d2fa..83213fc24f6 100644 --- a/sys/dev/ic/com.c +++ b/sys/dev/ic/com.c @@ -1,4 +1,4 @@ -/* $NetBSD: com.c,v 1.371 2021/10/21 10:22:54 jmcneill Exp $ */ +/* $NetBSD: com.c,v 1.372 2021/10/30 11:43:17 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.371 2021/10/21 10:22:54 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.372 2021/10/30 11:43:17 jmcneill Exp $"); #include "opt_com.h" #include "opt_ddb.h" @@ -2147,7 +2147,9 @@ comintr(void *arg) /* DesignWare APB UART BUSY interrupt */ if (sc->sc_type == COM_TYPE_DW_APB && (iir & IIR_BUSY) == IIR_BUSY) { - if ((CSR_READ_1(regsp, COM_REG_USR) & 0x1) != 0) { + if (ISSET(sc->sc_hwflags, COM_HW_CONSOLE)) { + (void)CSR_READ_1(regsp, COM_REG_USR); + } else if ((CSR_READ_1(regsp, COM_REG_USR) & 0x1) != 0) { CSR_WRITE_1(regsp, COM_REG_HALT, HALT_CHCFG_EN); CSR_WRITE_1(regsp, COM_REG_LCR, sc->sc_lcr | LCR_DLAB); CSR_WRITE_1(regsp, COM_REG_DLBL, sc->sc_dlbl); |
