From: patrick Date: Fri, 16 Feb 2018 07:37:48 +0000 (+0000) Subject: Support card interrupts in imxesdhc(4). The code that was written X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=faf8eea87dffc1d40a5992282aea18e82708bb52;p=openbsd 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@ --- 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 * Copyright (c) 2006 Uwe Stuehler @@ -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); }