diff options
author | 2016-03-30 09:58:01 +0000 | |
---|---|---|
committer | 2016-03-30 09:58:01 +0000 | |
commit | c60768390573b0fbdd27197e93e7d756b31c40c6 (patch) | |
tree | 6292424d0a8c9ce65739162d5f24fbe66694cd65 /sys | |
parent | Add support for gpio-based interrupts. (diff) | |
download | wireguard-openbsd-c60768390573b0fbdd27197e93e7d756b31c40c6.tar.xz wireguard-openbsd-c60768390573b0fbdd27197e93e7d756b31c40c6.zip |
Expose the functionality that triggers a check for card insertion or removal.
ok jsg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sdmmc/sdhc.c | 11 | ||||
-rw-r--r-- | sys/dev/sdmmc/sdhcvar.h | 4 |
2 files changed, 13 insertions, 2 deletions
diff --git a/sys/dev/sdmmc/sdhc.c b/sys/dev/sdmmc/sdhc.c index 90c5ea76d83..f033593b5ee 100644 --- a/sys/dev/sdmmc/sdhc.c +++ b/sys/dev/sdmmc/sdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdhc.c,v 1.42 2016/03/27 18:49:41 kettenis Exp $ */ +/* $OpenBSD: sdhc.c,v 1.43 2016/03/30 09:58:01 kettenis Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -976,6 +976,15 @@ sdhc_intr(void *arg) return done; } +void +sdhc_needs_discover(struct sdhc_softc *sc) +{ + int host; + + for (host = 0; host < sc->sc_nhosts; host++) + sdmmc_needs_discover(sc->sc_host[host]->sdmmc); +} + #ifdef SDHC_DEBUG void sdhc_dump_regs(struct sdhc_host *hp) diff --git a/sys/dev/sdmmc/sdhcvar.h b/sys/dev/sdmmc/sdhcvar.h index ffea71e8d44..edd1c27f1f7 100644 --- a/sys/dev/sdmmc/sdhcvar.h +++ b/sys/dev/sdmmc/sdhcvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sdhcvar.h,v 1.7 2016/03/27 18:49:41 kettenis Exp $ */ +/* $OpenBSD: sdhcvar.h,v 1.8 2016/03/30 09:58:01 kettenis Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -39,6 +39,8 @@ int sdhc_activate(struct device *, int); void sdhc_shutdown(void *); int sdhc_intr(void *); +void sdhc_needs_discover(struct sdhc_softc *); + /* flag values */ #define SDHC_F_NOPWR0 (1 << 0) |