On Mon, Oct 20, 2014 at 02:40:13AM -0400, Andrew Hills wrote: > On 10/19/14, 11:15 AM, Gerke M. Preussner wrote: > > I haven't had any time yet to look into this. Were you able to make any > > progress on your end? > > I'm not sure I'd call it progress; I'm not familiar with the MMC > protocol, so I'm spending most of my time learning rather than debugging. > > During the initialization, I see sys/dev/sdmmc roughly follow this order: > > sdmmc_card_attach() > . sdmmc_enable() > .. sdmmc_mem_enable() > ... sdmmc_mem_send_op_cond() reads memory OCR > ... sdmmc_mem_send_op_cond() attempts to send memory OCR > .... sdmmc_mmc_command() doesn't fail, but doesn't succeed > (MMC_OCR_MEM_READY is not set) > .... command times out after 100 attempts (sdmmc_mem.c:519-538) > > What I haven't been able to figure out is why the command doesn't have > the intended effect. Unfortunately, I enabled debug statements in > sys/arch/armv7/omap/ommmc.c without thinking, so the system is unusable > until I get the old bsd.umg back. Hopefully more to come soon. >
I ran into this with a UHS-I micro-SD card that works with sdhc on x230 but not on the bbb with ommc. bbb rev C: sdmmc1: CID: mid=0x70 oid=0x0100 pnm="MMC04G" rev=0x00 psn=0x1f9b89ce mdt=000 sdmmc1: read_bl_len=512 sector_size=512 scsibus0 at sdmmc1: 2 targets, initiator 0 sd0 at scsibus0 targ 1 lun 0: <SD/MMC, Drive #01, > SCSI2 0/direct fixed sd0: 3688MB, 512 bytes/sector, 7553024 sectors sdmmc0: can't read memory OCR sdmmc0: can't enable memory mode sdmmc0: can't enable card x230: sd1 at scsibus4 targ 1 lun 0: <SD/MMC, Drive #01, > SCSI2 0/direct fixed sd1: 15271MB, 512 bytes/sector, 31275008 sectors bbb running linux: [ 0.872767] mmc0: host does not support reading read-only switch. assuming write-enable. [ 0.874833] mmc0: new high speed SDHC card at address 59b4 [ 0.878695] mmcblk0: mmc0:59b4 14.9 GiB [ 0.880125] mmcblk0: p1 [ 0.932565] mmc1: BKOPS_EN bit is not set [ 0.936480] mmc1: new high speed MMC card at address 0001 [ 0.937035] mmcblk1: mmc1:0001 MMC04G 3.60 GiB [ 0.937253] mmcblk1boot0: mmc1:0001 MMC04G partition 1 2.00 MiB [ 0.937470] mmcblk1boot1: mmc1:0001 MMC04G partition 2 2.00 MiB [ 0.938542] mmcblk1: p1 p2 u-boot: U-Boot# mmcinfo Device: OMAP SD/MMC Manufacturer ID: 28 OEM: 4245 Name: Tran Speed: 50000000 Rd Block Len: 512 SD version 3.0 High Capacity: Yes Capacity: 14.9 GiB Bus Width: 4-bit It seems the am335x handles software reset differently. Before waiting for the bit to clear, a wait for it to be set should occur. Along the lines of https://www.netbsd.org/~riastradh/tmp/sdhc-am335x-quirk.patch I tried something similiar but it didn't seem to help. And it doesn't seem to be UHS related as it happens with a 4GB card: Device: OMAP SD/MMC Manufacturer ID: 3 OEM: 5344 Name: SU04G Tran Speed: 50000000 Rd Block Len: 512 SD version 2.0 High Capacity: Yes Capacity: 3.7 GiB Bus Width: 4-bit