Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc sdhc(4) currently only implements support for ...
details: https://anonhg.NetBSD.org/src/rev/44f41939ad7e
branches: trunk
changeset: 780543:44f41939ad7e
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Sat Jul 28 20:08:51 2012 +0000
description:
sdhc(4) currently only implements support for the SDHC 1.0 DMA mechanism, so
only enable in that case.
diffstat:
sys/dev/sdmmc/sdhc.c | 16 +++++++---------
1 files changed, 7 insertions(+), 9 deletions(-)
diffs (44 lines):
diff -r 2966626d3ce5 -r 44f41939ad7e sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c Sat Jul 28 19:21:57 2012 +0000
+++ b/sys/dev/sdmmc/sdhc.c Sat Jul 28 20:08:51 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhc.c,v 1.26 2012/07/26 18:36:09 matt Exp $ */
+/* $NetBSD: sdhc.c,v 1.27 2012/07/28 20:08:51 jakllsch 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.26 2012/07/26 18:36:09 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.27 2012/07/28 20:08:51 jakllsch Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -301,9 +301,10 @@
}
/* Use DMA if the host system and the controller support it. */
- if (ISSET(sc->sc_flags, SDHC_FLAG_FORCE_DMA)
- || ((ISSET(sc->sc_flags, SDHC_FLAG_USE_DMA)
- && ISSET(caps, SDHC_DMA_SUPPORT)))) {
+ if ((hp->specver == SDHC_SPEC_VERS_100) &&
+ (ISSET(sc->sc_flags, SDHC_FLAG_FORCE_DMA) ||
+ (ISSET(sc->sc_flags, SDHC_FLAG_USE_DMA &&
+ ISSET(caps, SDHC_DMA_SUPPORT))))) {
SET(hp->flags, SHF_USE_DMA);
aprint_normal_dev(sc->sc_dev, "using DMA transfer\n");
}
@@ -404,10 +405,7 @@
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;
- if (!ISSET(sc->sc_flags, SDHC_FLAG_ENHANCED)) {
- saa.saa_caps |= SMC_CAPS_MULTI_SEG_DMA;
- }
+ saa.saa_caps |= SMC_CAPS_DMA | SMC_CAPS_MULTI_SEG_DMA;
}
hp->sdmmc = config_found(sc->sc_dev, &saa, sdhc_cfprint);
Home |
Main Index |
Thread Index |
Old Index