Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/sdmmc MULTI_SEG does not for ESDHC. (Don't know how...



details:   https://anonhg.NetBSD.org/src/rev/140f7424acaa
branches:  trunk
changeset: 780469:140f7424acaa
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Jul 26 18:36:09 2012 +0000

description:
MULTI_SEG does not for ESDHC.  (Don't know how it works at all on any SDHC
but ...)

diffstat:

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

diffs (62 lines):

diff -r c4d4579f1527 -r 140f7424acaa sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c      Thu Jul 26 17:26:59 2012 +0000
+++ b/sys/dev/sdmmc/sdhc.c      Thu Jul 26 18:36:09 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdhc.c,v 1.25 2012/07/23 13:32:19 matt Exp $   */
+/*     $NetBSD: sdhc.c,v 1.26 2012/07/26 18:36:09 matt 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.25 2012/07/23 13:32:19 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.26 2012/07/26 18:36:09 matt Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -403,8 +403,12 @@
                saa.saa_caps |= SMC_CAPS_8BIT_MODE;
        if (ISSET(caps, SDHC_HIGH_SPEED_SUPP))
                saa.saa_caps |= SMC_CAPS_SD_HIGHSPEED;
-       if (ISSET(hp->flags, SHF_USE_DMA))
-               saa.saa_caps |= SMC_CAPS_DMA | SMC_CAPS_MULTI_SEG_DMA;
+       if (ISSET(hp->flags, SHF_USE_DMA)) {
+               saa.saa_caps |= SMC_CAPS_DMA;
+               if (!ISSET(sc->sc_flags, SDHC_FLAG_ENHANCED)) {
+                       saa.saa_caps |= SMC_CAPS_MULTI_SEG_DMA;
+               }
+       }
        hp->sdmmc = config_found(sc->sc_dev, &saa, sdhc_cfprint);
 
        return 0;
@@ -782,8 +786,8 @@
 
        /* Must not stop the clock if commands are in progress. */
        if (present && sdhc_card_detect(hp)) {
-               printf("%s: sdhc_sdclk_frequency_select: command in progress\n",
-                   device_xname(hp->sc->sc_dev));
+               aprint_normal_dev(hp->sc->sc_dev,
+                   "%s: command in progress\n", __func__);
        }
 #endif
 
@@ -978,8 +982,7 @@
        struct sdhc_host *hp = (struct sdhc_host *)sch;
        int error;
 
-#if 0
-       if (cmd->c_data) {
+       if (cmd->c_data && ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED)) {
                const uint16_t ready = SDHC_BUFFER_READ_READY | SDHC_BUFFER_WRITE_READY;
                if (ISSET(hp->flags, SHF_USE_DMA)) {
                        HCLR2(hp, SDHC_NINTR_SIGNAL_EN, ready);
@@ -989,7 +992,6 @@
                        HSET2(hp, SDHC_NINTR_STATUS_EN, ready);
                }  
        }
-#endif
 
        /*
         * Start the MMC command, or mark `cmd' as failed and return.



Home | Main Index | Thread Index | Old Index