summaryrefslogtreecommitdiff
path: root/sys/dev/sdmmc
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sdmmc')
-rw-r--r--sys/dev/sdmmc/sdmmc_mem.c4
-rw-r--r--sys/dev/sdmmc/sdmmcreg.h5
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/dev/sdmmc/sdmmc_mem.c b/sys/dev/sdmmc/sdmmc_mem.c
index 459444e6f5f..da2d4c042a0 100644
--- a/sys/dev/sdmmc/sdmmc_mem.c
+++ b/sys/dev/sdmmc/sdmmc_mem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdmmc_mem.c,v 1.21 2015/04/22 04:02:06 jsg Exp $ */
+/* $OpenBSD: sdmmc_mem.c,v 1.22 2015/11/08 12:10:27 jsg Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -525,6 +525,8 @@ sdmmc_mem_send_op_cond(struct sdmmc_softc *sc, u_int32_t ocr,
cmd.c_opcode = SD_APP_OP_COND;
error = sdmmc_app_command(sc, &cmd);
} else {
+ cmd.c_arg &= ~MMC_OCR_ACCESS_MODE_MASK;
+ cmd.c_arg |= MMC_OCR_SECTOR_MODE;
cmd.c_opcode = MMC_SEND_OP_COND;
error = sdmmc_mmc_command(sc, &cmd);
}
diff --git a/sys/dev/sdmmc/sdmmcreg.h b/sys/dev/sdmmc/sdmmcreg.h
index 7807f3b76ea..fd5080bf6c1 100644
--- a/sys/dev/sdmmc/sdmmcreg.h
+++ b/sys/dev/sdmmc/sdmmcreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdmmcreg.h,v 1.6 2014/09/23 12:08:13 rapha Exp $ */
+/* $OpenBSD: sdmmcreg.h,v 1.7 2015/11/08 12:10:27 jsg Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -48,6 +48,9 @@
/* OCR bits */
#define MMC_OCR_MEM_READY (1<<31) /* memory power-up status bit */
+#define MMC_OCR_ACCESS_MODE_MASK 0x60000000 /* bits 30:29 */
+#define MMC_OCR_SECTOR_MODE (1<<30)
+#define MMC_OCR_BYTE_MODE (1<<29)
#define MMC_OCR_3_5V_3_6V (1<<23)
#define MMC_OCR_3_4V_3_5V (1<<22)
#define MMC_OCR_3_3V_3_4V (1<<21)