summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpatrick <patrick@openbsd.org>2018-02-16 07:37:48 +0000
committerpatrick <patrick@openbsd.org>2018-02-16 07:37:48 +0000
commitfaf8eea87dffc1d40a5992282aea18e82708bb52 (patch)
tree932251af6627d4e13d0ba021c8a18c78ef0288e9
parentsimplify synopsis and text; (diff)
downloadwireguard-openbsd-faf8eea87dffc1d40a5992282aea18e82708bb52.tar.xz
wireguard-openbsd-faf8eea87dffc1d40a5992282aea18e82708bb52.zip
Support card interrupts in imxesdhc(4). The code that was written
initially was never tested with SDIO, as there had been no user. With bwfm(4) we now have the first SDIO card on that controller. Align the code with the standard sdhc(4), so that it doesn't hang after the first interrupt fires. ok kettenis@
-rw-r--r--sys/arch/armv7/imx/imxesdhc.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/arch/armv7/imx/imxesdhc.c b/sys/arch/armv7/imx/imxesdhc.c
index 8414dedcb37..15152fe42e0 100644
--- a/sys/arch/armv7/imx/imxesdhc.c
+++ b/sys/arch/armv7/imx/imxesdhc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: imxesdhc.c,v 1.38 2017/12/30 13:34:56 kettenis Exp $ */
+/* $OpenBSD: imxesdhc.c,v 1.39 2018/02/16 07:37:48 patrick Exp $ */
/*
* Copyright (c) 2009 Dale Rahn <drahn@openbsd.org>
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -738,8 +738,6 @@ imxesdhc_bus_width(sdmmc_chipset_handle_t sch, int width)
void
imxesdhc_card_intr_mask(sdmmc_chipset_handle_t sch, int enable)
{
- printf("imxesdhc_card_intr_mask\n");
- /* - this is SDIO card interrupt */
struct imxesdhc_softc *sc = sch;
if (enable) {
@@ -756,9 +754,7 @@ imxesdhc_card_intr_ack(sdmmc_chipset_handle_t sch)
{
struct imxesdhc_softc *sc = sch;
- printf("imxesdhc_card_intr_ack\n");
-
- HWRITE4(sc, SDHC_INT_STATUS, SDHC_INT_STATUS_CINT);
+ HSET4(sc, SDHC_INT_STATUS_EN, SDHC_INT_STATUS_CINT);
}
int
@@ -1206,7 +1202,7 @@ imxesdhc_intr(void *arg)
*/
if (ISSET(status, SDHC_INT_STATUS_CINT)) {
DPRINTF(0,("%s: card interrupt\n", HDEVNAME(sc)));
- HCLR4(sc, SDHC_INT_STATUS, SDHC_INT_STATUS_CINT);
+ HCLR4(sc, SDHC_INT_STATUS_EN, SDHC_INT_STATUS_CINT);
sdmmc_card_intr(sc->sdmmc);
}