<!DOCTYPE html>
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Hi all,<br>
    <br>
    I'm trying to get running an custom target with TI AM335x, BSP
    beagleboardorig and rtems-master / libbsd-master, u-boot (also
    master branch) and have problems with the SDHCI driver in libbsd.<br>
    <br>
    The target has an SD card at mmc1 and 8GB eMMC at mmc2. Both
    memories are working well in u-boot - no problems at all.<br>
    In my rtems test program they are mounted with media-server and the
    media listener function means "SUCCESS" to all partitions and
    (fat-)filesystems.<br>
    BUT: after the mount in a shell there is nothing possible with the
    mounts, no listing, no file access (RTEMS_IO_ERROR).<br>
    I stripped the problem down to the first multiblock read CMD18 with
    SDHCI_TRNS_MULTI. After this there is an interrupt timeout 0x18000
    and the card (or eMMC) hangs forever.<br>
    The single block reads before seems to work.<br>
    I'm not so familiar with the sdhci driver of freebsd to find the
    right place for an additional delay or so, but tried to set some
    additional quirks in ti_sdhci.c/<span
      style="background-color:#ffffff;padding:0px 0px 0px 2px;"><span
style="color:#000000;background-color:#ffffff;font-family:"Monospace";font-size:10pt;white-space:pre;"><span
      style="color:#000000;background-color:#d4d4d4;font-weight:bold;">ti_sdhci_attach </span></span></span>like
    SDHCI_QUIRK_BROKEN_TIMEOUT_VAL without success. With
    SDHCI_QUIRK_BROKEN_AUTO_STOP  the memories seems to work, but
    extremely slow.<br>
    <br>
    Here ist a part of debug listing with the last mount CMD18 and then
    the shell 'ls'.<br>
    <br>
    mmc0: REQUEST: CMD18 arg 0x5820 flags 0x35 data 8192<br>
    sdhci_ti0-slot0: CMD18 arg 0x5820 flags 0x35 dlen 8192 dflags 0xa<br>
    sdhci_ti0-slot0: Blk size: 0x00000200 | Blk cnt:  0x00000010<br>
    sdhci_ti0-slot0: Starting command opcode 0x12 flags 0x3a<br>
    sdhci_ti0-slot0: Interrupt 0x21<br>
    sdhci_ti0-slot0: sdhci_finish_command: called, err 0 flags 0x35<br>
    sdhci_ti0-slot0: Resp: 0x900 0000 0000 0000<br>
    sdhci_ti0-slot0: Interrupt 0x22<br>
    sdhci_ti0-slot0: result: 0<br>
    mmc0: CMD18 RESULT: 0<br>
    mmc0: REQUEST: CMD13 arg 0x59b40000 flags 0x15<br>
    sdhci_ti0-slot0: CMD13 arg 0x59b40000 flags 0x15 dlen 0 dflags 0<br>
    sdhci_ti0-slot0: Starting command opcode 0x0d flags 0x1a<br>
    sdhci_ti0-slot0: Interrupt 0x1<br>
    sdhci_ti0-slot0: sdhci_finish_command: called, err 0 flags 0x15<br>
    sdhci_ti0-slot0: Resp: 0xb00 0000 0000 0000<br>
    sdhci_ti0-slot0: result: 0<br>
    mmc0: CMD13 RESULT: 0<br>
    media listener: event = MOUNT, state = SUCCESS, src =
    /dev/mmcsd-0-1, dest = /media/mmcsd-0-1<br>
    <br>
    SHLL [/] # ls -l /media/mmcsd-0-1<br>
    mmc0: REQUEST: CMD18 arg 0x13fa0 flags 0x35 data 8192<br>
    sdhci_ti0-slot0: CMD18 arg 0x13fa0 flags 0x35 dlen 8192 dflags 0xa<br>
    sdhci_ti0-slot0: Blk size: 0x00000200 | Blk cnt:  0x00000010<br>
    sdhci_ti0-slot0: Starting command opcode 0x12 flags 0x3a<br>
    sdhci_ti0-slot0: Interrupt 0x18000<br>
    sdhci_ti0-slot0: sdhci_finish_command: called, err 1 flags 0x35<br>
    sdhci_ti0-slot0: result: 1<br>
    mmc0: CMD18 RESULT: 1<br>
    mmc0: REQUEST: CMD18 arg 0x14040 flags 0x35 data 8192<br>
    sdhci_ti0-slot0: CMD18 arg 0x14040 flags 0x35 dlen 8192 dflags 0xa<br>
    sdhci_ti0-slot0: Blk size: 0x00000200 | Blk cnt:  0x00000010<br>
    sdhci_ti0-slot0: Starting command opcode 0x12 flags 0x3a<br>
    sdhci_ti0-slot0: Interrupt 0x18000<br>
    sdhci_ti0-slot0: sdhci_finish_command: called, err 1 flags 0x35<br>
    sdhci_ti0-slot0: result: 1<br>
    mmc0: CMD18 RESULT: 1<br>
    mmc0: REQUEST: CMD18 arg 0x13fa0 flags 0x35 data 8192<br>
    sdhci_ti0-slot0: CMD18 arg 0x13fa0 flags 0x35 dlen 8192 dflags 0xa<br>
    sdhci_ti0-slot0: Blk size: 0x00000200 | Blk cnt:  0x00000010<br>
    sdhci_ti0-slot0: Starting command opcode 0x12 flags 0x3a<br>
    sdhci_ti0-slot0: Interrupt 0x18000<br>
    sdhci_ti0-slot0: sdhci_finish_command: called, err 1 flags 0x35<br>
    sdhci_ti0-slot0: result: 1<br>
    mmc0: CMD18 RESULT: 1<br>
    mmc0: REQUEST: CMD18 arg 0x14040 flags 0x35 data 8192<br>
    sdhci_ti0-slot0: CMD18 arg 0x14040 flags 0x35 dlen 8192 dflags 0xa<br>
    sdhci_ti0-slot0: Blk size: 0x00000200 | Blk cnt:  0x00000010<br>
    sdhci_ti0-slot0: Starting command opcode 0x12 flags 0x3a<br>
    sdhci_ti0-slot0: Interrupt 0x18000<br>
    sdhci_ti0-slot0: sdhci_finish_command: called, err 1 flags 0x35<br>
    sdhci_ti0-slot0: result: 1<br>
    mmc0: CMD18 RESULT: 1<br>
    SHLL [/] # <br>
    <br>
    <br>
    Does anybody have an idea? Thanks for your help in advance.<br>
    Jens<br>
    <br>
  </body>
</html>