SDHCI issue in libbsd with TI am335x
Jens Gollasch
jens.gollasch at lss-lighting.de
Tue Jan 30 10:54:24 UTC 2024
Hi all,
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.
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.
In my rtems test program they are mounted with media-server and the
media listener function means "SUCCESS" to all partitions and
(fat-)filesystems.
BUT: after the mount in a shell there is nothing possible with the
mounts, no listing, no file access (RTEMS_IO_ERROR).
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.
The single block reads before seems to work.
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/ti_sdhci_attach like SDHCI_QUIRK_BROKEN_TIMEOUT_VAL
without success. With SDHCI_QUIRK_BROKEN_AUTO_STOP the memories seems
to work, but extremely slow.
Here ist a part of debug listing with the last mount CMD18 and then the
shell 'ls'.
mmc0: REQUEST: CMD18 arg 0x5820 flags 0x35 data 8192
sdhci_ti0-slot0: CMD18 arg 0x5820 flags 0x35 dlen 8192 dflags 0xa
sdhci_ti0-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000010
sdhci_ti0-slot0: Starting command opcode 0x12 flags 0x3a
sdhci_ti0-slot0: Interrupt 0x21
sdhci_ti0-slot0: sdhci_finish_command: called, err 0 flags 0x35
sdhci_ti0-slot0: Resp: 0x900 0000 0000 0000
sdhci_ti0-slot0: Interrupt 0x22
sdhci_ti0-slot0: result: 0
mmc0: CMD18 RESULT: 0
mmc0: REQUEST: CMD13 arg 0x59b40000 flags 0x15
sdhci_ti0-slot0: CMD13 arg 0x59b40000 flags 0x15 dlen 0 dflags 0
sdhci_ti0-slot0: Starting command opcode 0x0d flags 0x1a
sdhci_ti0-slot0: Interrupt 0x1
sdhci_ti0-slot0: sdhci_finish_command: called, err 0 flags 0x15
sdhci_ti0-slot0: Resp: 0xb00 0000 0000 0000
sdhci_ti0-slot0: result: 0
mmc0: CMD13 RESULT: 0
media listener: event = MOUNT, state = SUCCESS, src = /dev/mmcsd-0-1,
dest = /media/mmcsd-0-1
SHLL [/] # ls -l /media/mmcsd-0-1
mmc0: REQUEST: CMD18 arg 0x13fa0 flags 0x35 data 8192
sdhci_ti0-slot0: CMD18 arg 0x13fa0 flags 0x35 dlen 8192 dflags 0xa
sdhci_ti0-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000010
sdhci_ti0-slot0: Starting command opcode 0x12 flags 0x3a
sdhci_ti0-slot0: Interrupt 0x18000
sdhci_ti0-slot0: sdhci_finish_command: called, err 1 flags 0x35
sdhci_ti0-slot0: result: 1
mmc0: CMD18 RESULT: 1
mmc0: REQUEST: CMD18 arg 0x14040 flags 0x35 data 8192
sdhci_ti0-slot0: CMD18 arg 0x14040 flags 0x35 dlen 8192 dflags 0xa
sdhci_ti0-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000010
sdhci_ti0-slot0: Starting command opcode 0x12 flags 0x3a
sdhci_ti0-slot0: Interrupt 0x18000
sdhci_ti0-slot0: sdhci_finish_command: called, err 1 flags 0x35
sdhci_ti0-slot0: result: 1
mmc0: CMD18 RESULT: 1
mmc0: REQUEST: CMD18 arg 0x13fa0 flags 0x35 data 8192
sdhci_ti0-slot0: CMD18 arg 0x13fa0 flags 0x35 dlen 8192 dflags 0xa
sdhci_ti0-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000010
sdhci_ti0-slot0: Starting command opcode 0x12 flags 0x3a
sdhci_ti0-slot0: Interrupt 0x18000
sdhci_ti0-slot0: sdhci_finish_command: called, err 1 flags 0x35
sdhci_ti0-slot0: result: 1
mmc0: CMD18 RESULT: 1
mmc0: REQUEST: CMD18 arg 0x14040 flags 0x35 data 8192
sdhci_ti0-slot0: CMD18 arg 0x14040 flags 0x35 dlen 8192 dflags 0xa
sdhci_ti0-slot0: Blk size: 0x00000200 | Blk cnt: 0x00000010
sdhci_ti0-slot0: Starting command opcode 0x12 flags 0x3a
sdhci_ti0-slot0: Interrupt 0x18000
sdhci_ti0-slot0: sdhci_finish_command: called, err 1 flags 0x35
sdhci_ti0-slot0: result: 1
mmc0: CMD18 RESULT: 1
SHLL [/] #
Does anybody have an idea? Thanks for your help in advance.
Jens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20240130/ba495d0c/attachment-0001.htm>
More information about the users
mailing list