summaryrefslogtreecommitdiffstats
path: root/sys/dev/sdmmc
diff options
context:
space:
mode:
authoruwe <uwe@openbsd.org>2007-03-18 20:53:10 +0000
committeruwe <uwe@openbsd.org>2007-03-18 20:53:10 +0000
commit58eb2f8f9003559fd5c31c7765a3482a85cd750a (patch)
tree8331c525ae77ddc64ca3cfe4862bf974a1bd2f75 /sys/dev/sdmmc
parentAdd an interface to scoop(4) to control CF and SD card power (diff)
downloadwireguard-openbsd-58eb2f8f9003559fd5c31c7765a3482a85cd750a.tar.xz
wireguard-openbsd-58eb2f8f9003559fd5c31c7765a3482a85cd750a.zip
Support the PXA27x SD/SDIO/MMC controller on Zaurus
We use the suggested workaround for the problem E40 in the PXA27x errata sheet. Unfortunately this limits the bus speed to 9.75Mhz.
Diffstat (limited to 'sys/dev/sdmmc')
-rw-r--r--sys/dev/sdmmc/sdmmcvar.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/sdmmc/sdmmcvar.h b/sys/dev/sdmmc/sdmmcvar.h
index 2c2bdd27e14..13041d85368 100644
--- a/sys/dev/sdmmc/sdmmcvar.h
+++ b/sys/dev/sdmmc/sdmmcvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdmmcvar.h,v 1.5 2006/11/29 14:16:43 uwe Exp $ */
+/* $OpenBSD: sdmmcvar.h,v 1.6 2007/03/18 20:53:10 uwe Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -76,6 +76,7 @@ struct sdmmc_command {
int c_blklen; /* block length */
int c_flags; /* see below */
#define SCF_ITSDONE 0x0001 /* command is complete */
+#define SCF_CMD(flags) ((flags) & 0x00f0)
#define SCF_CMD_AC 0x0000
#define SCF_CMD_ADTC 0x0010
#define SCF_CMD_BC 0x0020
@@ -94,8 +95,12 @@ struct sdmmc_command {
#define SCF_RSP_R4 (SCF_RSP_PRESENT)
#define SCF_RSP_R5 (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX)
#define SCF_RSP_R5B (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX|SCF_RSP_BSY)
-#define SCF_RSP_R6 (SCF_RSP_PRESENT|SCF_RSP_CRC)
+#define SCF_RSP_R6 (SCF_RSP_PRESENT|SCF_RSP_CRC|SCF_RSP_IDX)
int c_error; /* errno value on completion */
+
+ /* Host controller owned fields for data xfer in progress */
+ int c_resid; /* remaining I/O */
+ u_char *c_buf; /* remaining data */
};
/*