summaryrefslogtreecommitdiff
path: root/sys/dev/sdmmc
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2011-07-31 16:55:02 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2011-07-31 16:55:02 +0000
commit4b031abc17a6370d0b726416f2add8e84c98821c (patch)
tree60556734b32ca1e24cfd35c61130c687e6fed6ea /sys/dev/sdmmc
parenta2fd3d74e8f86ca407cb84f7e0e32ae15e835281 (diff)
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.c8
-rw-r--r--sys/dev/sdmmc/sdhcvar.h4
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 *);