[U-Boot] "Writing to MMC(%d)... failed"

Nathan naroyce at hotmail.com
Fri Feb 27 18:21:25 CET 2015


On Fri, Feb 27, 2015 at 7:16 AM, Przemyslaw Marczak
<p.marczak at samsung.com> wrote:
> This is too late for debug. The same result I can see when my card is not
> inserted.
Ugh, I meant to include the link to my post in the odroid forums which
included the entire (very long) output:
http://forum.odroid.com/viewtopic.php?f=13&t=2883#p76524

I'll inline compare my lines with yours, and prepend and append '*' to
those that differ:
> You should follow the card init sequence with the trace config, because it
> fails at init. This is the trace output from init sequence of my SD card:
>
> MMC:   SAMSUNG SDHCI: 0, EXYNOS DWMMC: 1
   MMC:   SAMSUNG SDHCI: 0, EXYNOS DWMMC: 1
> CMD_SEND:0
   CMD_SEND:0
>                 ARG                      0x00000000
                   ARG                      0x00000000
>                 MMC_RSP_NONE
                   MMC_RSP_NONE
> CMD_SEND:8
   CMD_SEND:8
>                 ARG                      0x000001AA
                   ARG                      0x000001AA
>                 MMC_RSP_R1,5,6,7         0x000001AA
                   MMC_RSP_R1,5,6,7         0x000001AA
> CMD_SEND:55
   CMD_SEND:55
>                 ARG                      0x00000000
                   ARG                      0x00000000
>                 MMC_RSP_R1,5,6,7         0x00000120
                   MMC_RSP_R1,5,6,7         0x00000120
> CMD_SEND:41
   CMD_SEND:41
>                 ARG                      0x40300000
                   ARG                      0x40300000
>                 MMC_RSP_R3,4             0x40FF8000
                   MMC_RSP_R3,4             0x40FF8000
> CMD_SEND:55
   CMD_SEND:55
>                 ARG                      0x00000000
                   ARG                      0x00000000
>                 MMC_RSP_R1,5,6,7         0x00000120
                   MMC_RSP_R1,5,6,7         0x00000120
> CMD_SEND:41
   CMD_SEND:41
>                 ARG                      0x40300000
                   ARG                      0x40300000
>                 MMC_RSP_R3,4             0x40FF8000
*                  MMC_RSP_R3,4             0xC0FF8000*
At the moment, I don't know what that command corresponds with, but I
see the 55 and 41 are repeated 1 more time with yours before getting
that 41 output that I have. Perhaps it's a timing/retry attempt on
your system.
> CMD_SEND:55
>                 ARG                      0x00000000
>                 MMC_RSP_R1,5,6,7         0x00000120
*retry attempt? Not on mine.*
> CMD_SEND:41
>                 ARG                      0x40300000
>                 MMC_RSP_R3,4             0xC0FF8000
*retry attempt? Not on mine.*
> CMD_SEND:2
   CMD_SEND:2
>                 ARG                      0x00000000
                   ARG                      0x00000000
>                 MMC_RSP_R2               0x03534453
                   MMC_RSP_R2               0x03534453
>                                          0x55303447
*                                           0x55303847 *
>                                          0x80273727
*                                           0x8005FCD3*
>                                          0x6900E700
*                                           0x3000A400*
>
>                                         DUMPING DATA
                                           DUMPING DATA
>                                         000 - 03 53 44 53
                                           000 - 03 53 44 53
>                                         004 - 55 30 34 47
*                                          004 - 55 30 38 47*
>                                         008 - 80 27 37 27
*                                          008 - 80 05 FC D3*
>                                         012 - 69 00 E7 00
*                                          012 - 30 00 A4 00*
> CMD_SEND:3
   CMD_SEND:3
>                 ARG                      0x00000000
                   ARG                      0x00000000
>                 MMC_RSP_R1,5,6,7         0xAAAA0520
*                  MMC_RSP_R1,5,6,7         0xE6240520*
> CMD_SEND:9
   CMD_SEND:9
>                 ARG                      0xAAAA0000
*                  ARG                      0xE6240000*
>                 MMC_RSP_R2               0x400E0032
                   MMC_RSP_R2               0x400E0032
>                                          0x5B590000
                                            0x5B590000
>                                          0x1D8A7F80
*                                           0x3B377F80*
>                                          0x0A404000
                                            0x0A404000
>
>                                         DUMPING DATA
                                           DUMPING DATA
>                                         000 - 40 0E 00 32
                                           000 - 40 0E 00 32
>                                         004 - 5B 59 00 00
                                           004 - 5B 59 00 00
>                                         008 - 1D 8A 7F 80
*                                          008 - 3B 37 7F 80*
>                                         012 - 0A 40 40 00
                                           012 - 0A 40 40 00
> CMD_SEND:13
   CMD_SEND:13
>                 ARG                      0xAAAA0000
*                  ARG                      0xE6240000*
>                 MMC_RSP_R1,5,6,7         0x00000700
                   MMC_RSP_R1,5,6,7         0x00000700
> CURR STATE:3
   CURR STATE:3
> CMD_SEND:7
   CMD_SEND:7
>                 ARG                      0xAAAA0000
*                  ARG                      0xE6240000*
>                 MMC_RSP_R1,5,6,7         0x00000700
                   MMC_RSP_R1,5,6,7         0x00000700
> CMD_SEND:55
   CMD_SEND:55
>                 ARG                      0xAAAA0000
*                  ARG                      0xE6240000*
>                 MMC_RSP_R1,5,6,7         0x00000920
                   MMC_RSP_R1,5,6,7         0x00000920
> CMD_SEND:51
   CMD_SEND:51
>                 ARG                      0x00000000
                   ARG                      0x00000000
>                 MMC_RSP_R1,5,6,7         0x00000920
                   MMC_RSP_R1,5,6,7         0x00000920
> CMD_SEND:6
   CMD_SEND:6
>                 ARG                      0x00FFFFF1
                   ARG                      0x00FFFFF1
>                 MMC_RSP_R1,5,6,7         0x00000900
                   MMC_RSP_R1,5,6,7         0x00000900
> CMD_SEND:6
   CMD_SEND:6
>                 ARG                      0x80FFFFF1
                   ARG                      0x80FFFFF1
>                 MMC_RSP_R1,5,6,7         0x00000900
                   MMC_RSP_R1,5,6,7         0x00000900
> CMD_SEND:55
   CMD_SEND:55
>                 ARG                      0xAAAA0000
*                  ARG                      0xE6240000*
>                 MMC_RSP_R1,5,6,7         0x00000920
                   MMC_RSP_R1,5,6,7         0x00000920
> CMD_SEND:6
   CMD_SEND:6
>                 ARG                      0x00000002
                   ARG                      0x00000002
>                 MMC_RSP_R1,5,6,7         0x00000920
                   MMC_RSP_R1,5,6,7         0x00000920
> CMD_SEND:16
   CMD_SEND:16
>                 ARG                      0x00000200
                   ARG                      0x00000200
>                 MMC_RSP_R1,5,6,7         0x00000900
                   MMC_RSP_R1,5,6,7         0x00000900
> CMD_SEND:17
   CMD_SEND:17
>                 ARG                      0x00000000
                   ARG                      0x00000000
>                 MMC_RSP_R1,5,6,7         0x00000900
                   MMC_RSP_R1,5,6,7         0x00000900
> CMD_SEND:16
   CMD_SEND:16
>                 ARG                      0x00000200
                   ARG                      0x00000200
>                 MMC_RSP_R1,5,6,7         0x00000900
                   MMC_RSP_R1,5,6,7         0x00000900
> CMD_SEND:17
   CMD_SEND:17
>                 ARG                      0x00000000
                   ARG                      0x00000000
>                 MMC_RSP_R1,5,6,7         0x00000900
                   MMC_RSP_R1,5,6,7         0x00000900
> CMD_SEND:16
   CMD_SEND:16
>                 ARG                      0x00000200
                   ARG                      0x00000200
>                 MMC_RSP_R1,5,6,7         0x00000900
                   MMC_RSP_R1,5,6,7         0x00000900
> CMD_SEND:18
   CMD_SEND:18
>                 ARG                      0x00000A00
                   ARG                      0x00000A00
>                 MMC_RSP_R1,5,6,7         0x00000900
                   MMC_RSP_R1,5,6,7         0x00000900
> CMD_SEND:12
   CMD_SEND:12
>                 ARG                      0x00000000
                   ARG                      0x00000000
>                 MMC_RSP_R1b              0x00000900
                   MMC_RSP_R1b              0x00000900
>
> I hope this will help you to solve this issue.

I searched my output for any "ret" value < 0 and it was only for "CMD_SEND:16"
I should also add that I'm using odroid U2.

My output also doesn't stop at command 12. In fact I get an error
right after it: "*** Warning - bad CRC, using default environment".
But then that should be expected since I wipe blocks from 2560 to the
start of my first partition.
After that I get a bunch of 12, 16, 17, 18 commands (mostly 16, 17).

Thanks for taking the time to look into this issue.


More information about the U-Boot mailing list