Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc eSDHC has non standard Host Controller Version...
details: https://anonhg.NetBSD.org/src/rev/d87e71997a7b
branches: trunk
changeset: 805991:d87e71997a7b
user: nonaka <nonaka%NetBSD.org@localhost>
date: Mon Jan 26 04:56:56 2015 +0000
description:
eSDHC has non standard Host Controller Version Register offset.
diffstat:
sys/dev/sdmmc/sdhc.c | 10 +++++++---
sys/dev/sdmmc/sdhcreg.h | 3 ++-
2 files changed, 9 insertions(+), 4 deletions(-)
diffs (48 lines):
diff -r ab61974449ad -r d87e71997a7b sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c Mon Jan 26 04:47:53 2015 +0000
+++ b/sys/dev/sdmmc/sdhc.c Mon Jan 26 04:56:56 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhc.c,v 1.51 2014/10/04 18:09:32 jmcneill Exp $ */
+/* $NetBSD: sdhc.c,v 1.52 2015/01/26 04:56:56 nonaka 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.51 2014/10/04 18:09:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.52 2015/01/26 04:56:56 nonaka Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -268,7 +268,11 @@
mutex_init(&hp->intr_mtx, MUTEX_DEFAULT, IPL_SDMMC);
cv_init(&hp->intr_cv, "sdhcintr");
- sdhcver = HREAD2(hp, SDHC_HOST_CTL_VERSION);
+ if (ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED)) {
+ sdhcver = HREAD4(hp, SDHC_ESDHC_HOST_CTL_VERSION);
+ } else {
+ sdhcver = HREAD2(hp, SDHC_HOST_CTL_VERSION);
+ }
aprint_normal_dev(sc->sc_dev, "SD Host Specification ");
hp->specver = SDHC_SPEC_VERSION(sdhcver);
switch (SDHC_SPEC_VERSION(sdhcver)) {
diff -r ab61974449ad -r d87e71997a7b sys/dev/sdmmc/sdhcreg.h
--- a/sys/dev/sdmmc/sdhcreg.h Mon Jan 26 04:47:53 2015 +0000
+++ b/sys/dev/sdmmc/sdhcreg.h Mon Jan 26 04:56:56 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhcreg.h,v 1.11 2012/12/24 05:43:34 jakllsch Exp $ */
+/* $NetBSD: sdhcreg.h,v 1.12 2015/01/26 04:56:56 nonaka Exp $ */
/* $OpenBSD: sdhcreg.h,v 1.4 2006/07/30 17:20:40 fgsch Exp $ */
/*
@@ -170,6 +170,7 @@
#define SDHC_WATERMARK_READ_MASK 0xff
#define SDHC_MAX_CAPABILITIES 0x48
#define SDHC_SLOT_INTR_STATUS 0xfc
+#define SDHC_ESDHC_HOST_CTL_VERSION 0xfc /* eSDHC */
#define SDHC_HOST_CTL_VERSION 0xfe
#define SDHC_SPEC_VERS_SHIFT 0
#define SDHC_SPEC_VERS_MASK 0xff
Home |
Main Index |
Thread Index |
Old Index