Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc support 8-bit mode for SDHC 3.0+ controllers
details: https://anonhg.NetBSD.org/src/rev/f9792a1b7177
branches: trunk
changeset: 338573:f9792a1b7177
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat May 30 17:52:07 2015 +0000
description:
support 8-bit mode for SDHC 3.0+ controllers
diffstat:
sys/dev/sdmmc/sdhc.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diffs (34 lines):
diff -r 2bb4f1090ad7 -r f9792a1b7177 sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c Sat May 30 17:39:56 2015 +0000
+++ b/sys/dev/sdmmc/sdhc.c Sat May 30 17:52:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhc.c,v 1.58 2015/05/03 22:37:27 jmcneill Exp $ */
+/* $NetBSD: sdhc.c,v 1.59 2015/05/30 17:52:07 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.58 2015/05/03 22:37:27 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.59 2015/05/30 17:52:07 jmcneill Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -1029,8 +1029,14 @@
reg |= SDHC_ESDHC_8BIT_MODE;
} else {
reg &= ~SDHC_4BIT_MODE;
- if (width == 4)
+ if (hp->specver >= SDHC_SPEC_VERS_300) {
+ reg &= ~SDHC_8BIT_MODE;
+ }
+ if (width == 4) {
reg |= SDHC_4BIT_MODE;
+ } else if (width == 8 && hp->specver >= SDHC_SPEC_VERS_300) {
+ reg |= SDHC_8BIT_MODE;
+ }
}
HWRITE1(hp, SDHC_HOST_CTL, reg);
mutex_exit(&hp->host_mtx);
Home |
Main Index |
Thread Index |
Old Index