Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/sdmmc Don't check slot type for pre-3.0 controllers, ...



details:   https://anonhg.NetBSD.org/src/rev/1e41ed39b14f
branches:  trunk
changeset: 332618:1e41ed39b14f
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Wed Oct 01 00:25:43 2014 +0000

description:
Don't check slot type for pre-3.0 controllers, the bits were reserved at
the time. If an older controller advertises 1.8V support, just use it.
This fixes high-speed mode support for me on BeagleBone Black.

diffstat:

 sys/dev/sdmmc/sdhc.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r 718b2c637c9d -r 1e41ed39b14f sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c      Tue Sep 30 23:32:52 2014 +0000
+++ b/sys/dev/sdmmc/sdhc.c      Wed Oct 01 00:25:43 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdhc.c,v 1.47 2014/09/14 08:47:08 skrll Exp $  */
+/*     $NetBSD: sdhc.c,v 1.48 2014/10/01 00:25:43 jmcneill Exp $       */
 /*     $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $        */
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.47 2014/09/14 08:47:08 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.48 2014/10/01 00:25:43 jmcneill Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -353,8 +353,9 @@
        /*
         * Determine SD bus voltage levels supported by the controller.
         */
-       if (ISSET(caps, SDHC_EMBEDDED_SLOT) &&
-           ISSET(caps, SDHC_VOLTAGE_SUPP_1_8V)) {
+       if (ISSET(caps, SDHC_VOLTAGE_SUPP_1_8V) &&
+           (hp->specver < SDHC_SPEC_VERS_300 ||
+            ISSET(caps, SDHC_EMBEDDED_SLOT))) {
                SET(hp->ocr, MMC_OCR_1_7V_1_8V | MMC_OCR_1_8V_1_9V);
        }
        if (ISSET(caps, SDHC_VOLTAGE_SUPP_3_0V)) {



Home | Main Index | Thread Index | Old Index