For some reason cards that otherwise work on pretty much any machine Windows/Mac/Linux do not work on our embedded board. To make matters worse we have identical cards that work properly! I looked into the omap_hsmmc driver (kernel 2.6.32) and tried various changes such as reducing the clock rate enabling SPI mode etc but with no luck.
Here is the output from a working card (previous commands are identical):
mmc0: clock 24000000Hz busmode 2 powermode 2 cs 0 Vdd 16 width 2 timing 2
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SDHC card at address 59b4
mmcblk0: mmc0:59b4 SD 7.35 GiB
mmcblk0:
mmc0: starting CMD18 arg 00000000 flags 000000b5
mmc0: blksz 512 blocks 8 flags 00000200 tsac 100 ms nsac 0
mmc0: CMD12 arg 00000000 flags 0000049d
mmci-omap-hs mmci-omap-hs.0: mmc0: CMD18, argument 0x00000000
mmci-omap-hs mmci-omap-hs.0: IRQ Status is 1
mmci-omap-hs mmci-omap-hs.0: IRQ Status is 2
mmci-omap-hs mmci-omap-hs.0: mmc0: CMD12, argument 0x00000000
mmci-omap-hs mmci-omap-hs.0: IRQ Status is 3
mmc0: req done (CMD18): 0: 00000900 00000000 00000000 00000000
mmc0: 4096 bytes transferred: 0
mmc0: (CMD12): 0: 00000b00 00000000 00000000 00000000
p1 p2
mmci-omap-hs mmci-omap-hs.0: mmc_fclk: disabled
mmci-omap-hs mmci-omap-hs.0: mmc_fclk: enabled
mmci-omap-hs mmci-omap-hs.0: context was not lost
mmc0: starting CMD18 arg 000234cb flags 000000b5
mmc0: blksz 512 blocks 2 flags 00000200 tsac 100 ms nsac 0
mmc0: CMD12 arg 00000000 flags 0000049d
mmci-omap-hs mmci-omap-hs.0: mmc0: CMD18, argument 0x000234cb
mmci-omap-hs mmci-omap-hs.0: IRQ Status is 1
mmci-omap-hs mmci-omap-hs.0: IRQ Status is 2
mmci-omap-hs mmci-omap-hs.0: mmc0: CMD12, argument 0x00000000
mmci-omap-hs mmci-omap-hs.0: IRQ Status is 3
And the bad card:
mmc0: clock 24000000Hz busmode 2 powermode 2 cs 0 Vdd 16 width 2 timing 2
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SDHC card at address 59b4
mmcblk0: mmc0:59b4 SD 7.35 GiB
mmcblk0:
mmc0: starting CMD18 arg 00000000 flags 000000b5
mmc0: blksz 512 blocks 8 flags 00000200 tsac 100 ms nsac 0
mmc0: CMD12 arg 00000000 flags 0000049d
mmci-omap-hs mmci-omap-hs.0: mmc0: CMD18, argument 0x00000000
mmci-omap-hs mmci-omap-hs.0: IRQ Status is 1
mmci-omap-hs mmci-omap-hs.0: IRQ Status is 208002
mmci-omap-hs mmci-omap-hs.0: MMC IRQ 0x208002 : TC ERRI DCRC
mmci-omap-hs mmci-omap-hs.0: mmc0: CMD12, argument 0x00000000
mmci-omap-hs mmci-omap-hs.0: IRQ Status is 3
mmc0: req done (CMD18): 0: 00000900 00000000 00000000 00000000
mmc0: 0 bytes transferred: -84
mmc0: (CMD12): 0: 00000b00 00000000 00000000 00000000
mmcblk0: retrying using single block read
mmc0: starting CMD17 arg 00000000 flags 000000b5
mmc0: blksz 512 blocks 1 flags 00000200 tsac 100 ms nsac 0
mmci-omap-hs mmci-omap-hs.0: mmc0: CMD17, argument 0x00000000
mmci-omap-hs mmci-omap-hs.0: IRQ Status is 1
mmci-omap-hs mmci-omap-hs.0: IRQ Status is 208002
mmci-omap-hs mmci-omap-hs.0: MMC IRQ 0x208002 : TC ERRI DCRC
mmc0: req done (CMD17): 0: 00000900 00000000 00000000 00000000
mmc0: 0 bytes transferred: -84
It looks like the multiblock DMA transfer fails (CMD18) so the driver attempts a single block transfer but that also fails.
What should I be looking at? If there anything else I can try with this driver? Also what does "MMC IRQ 0x208002 : TC ERRI DCRC" mean?
The problem was a bad connection while in 4 bit data mode.