Port-arm archive

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

SDMMC dose not work



I got the Jetson-TK1 few days ago.
I tried to booting, but sdmmc error occurred.

sdmmc2: couldn't identify card
sdmmc2: no functions

Similar error occurs in NetWalker as well.

I don't know that reason why, but it has occurred since below changes.
http://cvsweb.netbsd.org/cgi-bin/cvsweb.cgi/src/sys/dev/sdmmc/sdhc.c.diff?r1=1.83&r2=1.84&f=h

Hashimoto Kenichi.

NetWalker

Index: sdhc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/sdmmc/sdhc.c,v
retrieving revision 1.84
diff -u -r1.84 sdhc.c
--- sdhc.c      9 Aug 2015 13:46:50 -0000       1.84
+++ sdhc.c      7 Sep 2015 09:44:07 -0000
@@ -2127,7 +2127,7 @@
        }

        if (nointr ||
-           (ISSET(status, SDHC_ERROR_INTERRUPT) && error)) {
+           ISSET(status, SDHC_ERROR_INTERRUPT) || error) {
                if (!ISSET(hp->sc->sc_flags, SDHC_FLAG_ENHANCED))
                        (void)sdhc_soft_reset(hp, SDHC_RESET_CMD|SDHC_RESET_DAT);
                hp->intr_error_status = 0;

Jetson-TK1

Index: sdhc.c
===================================================================
RCS file: /cvsroot/src/sys/dev/sdmmc/sdhc.c,v
retrieving revision 1.84
diff -u -r1.84 sdhc.c
--- sdhc.c 9 Aug 2015 13:46:50 -0000 1.84
+++ sdhc.c 7 Sep 2015 09:44:07 -0000
@@ -2197,6 +2197,16 @@
                }

                /*
+                * Service error interrupts.
+                */
+               if (ISSET(error, SDHC_CMD_TIMEOUT_ERROR|
+                   SDHC_DATA_TIMEOUT_ERROR)) {
+                       hp->intr_error_status |= error;
+                       hp->intr_status |= status;
+                       cv_broadcast(&hp->intr_cv);
+               }
+
+               /*
                 * Wake up the sdmmc event thread to scan for cards.
                 */
                if (ISSET(status, SDHC_CARD_REMOVAL|SDHC_CARD_INSERTION)) {
@@ -2223,10 +2233,8 @@
                 * related interrupt(s).
                 */
                if (ISSET(status, SDHC_COMMAND_COMPLETE|
-                   SDHC_CMD_TIMEOUT_ERROR|SDHC_DATA_TIMEOUT_ERROR|
                    SDHC_BUFFER_READ_READY|SDHC_BUFFER_WRITE_READY|
                    SDHC_TRANSFER_COMPLETE|SDHC_DMA_INTERRUPT)) {
-                       hp->intr_error_status |= error;
                        hp->intr_status |= status;
                        if (ISSET(sc->sc_flags, SDHC_FLAG_ENHANCED)) {
                                HCLR4(hp, SDHC_NINTR_SIGNAL_EN,




Home | Main Index | Thread Index | Old Index