Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/sdmmc The iMX uSDHC controller doesn't have an inter...



details:   https://anonhg.NetBSD.org/src/rev/93964f8122a1
branches:  trunk
changeset: 340506:93964f8122a1
user:      mlelstv <mlelstv%NetBSD.org@localhost>
date:      Wed Sep 09 08:09:28 2015 +0000

description:
The iMX uSDHC controller doesn't have an interrupt error status flag,
the bit position is reserved and reads as value 0.
- Fake the flag if any of the error bits is set.
- uSDHC supports the 32bit access, the 16bit path doesn't need that quirk.

diffstat:

 sys/dev/sdmmc/sdhc.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 31c956fff0e8 -r 93964f8122a1 sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c      Wed Sep 09 08:06:47 2015 +0000
+++ b/sys/dev/sdmmc/sdhc.c      Wed Sep 09 08:09:28 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sdhc.c,v 1.86 2015/09/09 08:06:47 mlelstv Exp $        */
+/*     $NetBSD: sdhc.c,v 1.87 2015/09/09 08:09:28 mlelstv 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.86 2015/09/09 08:06:47 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.87 2015/09/09 08:09:28 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -2163,6 +2163,10 @@
                        uint32_t xstatus = HREAD4(hp, SDHC_NINTR_STATUS);
                        status = xstatus;
                        error = xstatus >> 16;
+                       if (ISSET(sc->sc_flags, SDHC_FLAG_ENHANCED)) {
+                               if ((error & SDHC_NINTR_STATUS_MASK) != 0)
+                                       SET(status, SDHC_ERROR_INTERRUPT);
+                       }
                        if (error)
                                xstatus |= SDHC_ERROR_INTERRUPT;
                        else if (!ISSET(status, SDHC_NINTR_STATUS_MASK))



Home | Main Index | Thread Index | Old Index