Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc Handle cards that are already in low voltage (...
details: https://anonhg.NetBSD.org/src/rev/aeab676761de
branches: trunk
changeset: 339696:aeab676761de
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Mon Aug 03 19:17:35 2015 +0000
description:
Handle cards that are already in low voltage (1.8V) mode. Test correct
bit when determining the best SD transfer mode.
diffstat:
sys/dev/sdmmc/sdmmc_mem.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
diffs (53 lines):
diff -r 72ecbf23e630 -r aeab676761de sys/dev/sdmmc/sdmmc_mem.c
--- a/sys/dev/sdmmc/sdmmc_mem.c Mon Aug 03 17:33:54 2015 +0000
+++ b/sys/dev/sdmmc/sdmmc_mem.c Mon Aug 03 19:17:35 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdmmc_mem.c,v 1.41 2015/08/03 12:10:29 jmcneill Exp $ */
+/* $NetBSD: sdmmc_mem.c,v 1.42 2015/08/03 19:17:35 jmcneill Exp $ */
/* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */
/*
@@ -45,7 +45,7 @@
/* Routines for SD/MMC memory cards. */
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.41 2015/08/03 12:10:29 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.42 2015/08/03 19:17:35 jmcneill Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -269,7 +269,8 @@
goto out;
delay(1000);
-
+ }
+ if (ISSET(host_ocr, MMC_OCR_S18A)) {
SET(sc->sc_flags, SMF_UHS_MODE);
}
@@ -699,20 +700,20 @@
{
if (ISSET(sc->sc_flags, SMF_UHS_MODE)) {
if (ISSET(sc->sc_caps, SMC_CAPS_UHS_SDR104) &&
- ISSET(support_func, SD_ACCESS_MODE_SDR104)) {
+ ISSET(support_func, 1 << SD_ACCESS_MODE_SDR104)) {
return SD_ACCESS_MODE_SDR104;
}
if (ISSET(sc->sc_caps, SMC_CAPS_UHS_DDR50) &&
- ISSET(support_func, SD_ACCESS_MODE_DDR50)) {
+ ISSET(support_func, 1 << SD_ACCESS_MODE_DDR50)) {
return SD_ACCESS_MODE_DDR50;
}
if (ISSET(sc->sc_caps, SMC_CAPS_UHS_SDR50) &&
- ISSET(support_func, SD_ACCESS_MODE_SDR50)) {
+ ISSET(support_func, 1 << SD_ACCESS_MODE_SDR50)) {
return SD_ACCESS_MODE_SDR50;
}
}
if (ISSET(sc->sc_caps, SMC_CAPS_SD_HIGHSPEED) &&
- ISSET(support_func, SD_ACCESS_MODE_SDR25)) {
+ ISSET(support_func, 1 << SD_ACCESS_MODE_SDR25)) {
return SD_ACCESS_MODE_SDR25;
}
return SD_ACCESS_MODE_SDR12;
Home |
Main Index |
Thread Index |
Old Index