diff options
author | 2011-07-31 16:55:01 +0000 | |
---|---|---|
committer | 2011-07-31 16:55:01 +0000 | |
commit | afa11e3fcd5c8daebf8eb4269b5236b96846e098 (patch) | |
tree | 0b4127e5426c3ed760aea771ed4226a6239cde97 /sys/dev/sdmmc | |
parent | Actually, by merging individual patches, we are already in sync (diff) | |
download | wireguard-openbsd-afa11e3fcd5c8daebf8eb4269b5236b96846e098.tar.xz wireguard-openbsd-afa11e3fcd5c8daebf8eb4269b5236b96846e098.zip |
Add support for the Ricoh 5U823 SD/MMC controller found on the x220.
ok deraadt@, phessler@
Diffstat (limited to 'sys/dev/sdmmc')
-rw-r--r-- | sys/dev/sdmmc/sdhc.c | 8 | ||||
-rw-r--r-- | sys/dev/sdmmc/sdhcvar.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/sdmmc/sdhc.c b/sys/dev/sdmmc/sdhc.c index 03d60bae7db..828e54284fb 100644 --- a/sys/dev/sdmmc/sdhc.c +++ b/sys/dev/sdmmc/sdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sdhc.c,v 1.33 2010/09/07 16:21:46 deraadt Exp $ */ +/* $OpenBSD: sdhc.c,v 1.34 2011/07/31 16:55:01 kettenis Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -129,11 +129,10 @@ struct cfdriver sdhc_cd = { */ int sdhc_host_found(struct sdhc_softc *sc, bus_space_tag_t iot, - bus_space_handle_t ioh, bus_size_t iosize, int usedma) + bus_space_handle_t ioh, bus_size_t iosize, int usedma, u_int32_t caps) { struct sdmmcbus_attach_args saa; struct sdhc_host *hp; - u_int32_t caps; int error = 1; #ifdef SDHC_DEBUG u_int16_t version; @@ -167,7 +166,8 @@ sdhc_host_found(struct sdhc_softc *sc, bus_space_tag_t iot, (void)sdhc_host_reset(hp); /* Determine host capabilities. */ - caps = HREAD4(hp, SDHC_CAPABILITIES); + if (caps == 0) + caps = HREAD4(hp, SDHC_CAPABILITIES); /* Use DMA if the host system and the controller support it. */ if (usedma && ISSET(caps, SDHC_DMA_SUPPORT)) diff --git a/sys/dev/sdmmc/sdhcvar.h b/sys/dev/sdmmc/sdhcvar.h index ac16eac30d6..1ad4518333a 100644 --- a/sys/dev/sdmmc/sdhcvar.h +++ b/sys/dev/sdmmc/sdhcvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sdhcvar.h,v 1.5 2010/09/07 16:21:46 deraadt Exp $ */ +/* $OpenBSD: sdhcvar.h,v 1.6 2011/07/31 16:55:01 kettenis Exp $ */ /* * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -32,7 +32,7 @@ struct sdhc_softc { /* Host controller functions called by the attachment driver. */ int sdhc_host_found(struct sdhc_softc *, bus_space_tag_t, - bus_space_handle_t, bus_size_t, int); + bus_space_handle_t, bus_size_t, int, u_int32_t); int sdhc_activate(struct device *, int); void sdhc_shutdown(void *); int sdhc_intr(void *); |