Other Parts Discussed in Thread: AM3359
Hello,
We are trying to connect a Bluegiga WT21-N-HCI Bluetooth module to an AM3359 over SDIO interface, but are facing communication problems between the host and the module. Our Kernel is based on the AM335x-PSP 04.06.00.10 (3.2.37).
So far the initial identification during boot seems to work, since the card gets detected:
...
[ 2.137878] mmc1: queuing unknown CIS tuple 0x91 (3 bytes)
[ 2.144897] mmc1: new SDIO card at address 0001
...
[ 18.235961] Bluetooth: Generic Bluetooth SDIO driver ver 0.1
[ 18.290466] Bluetooth: func cf23b400 id bf8aa5dc class 0x0002
[ 18.296508] Bluetooth: code 0x21 size 2
[ 18.300506] Bluetooth: code 0x91 size 3
[ 18.304504] Bluetooth: code 0x21 size 2
...
The problem occurs during initialization, when CMD53 is being used (see log below).
As far as I can tell it seems to be related to the block size, when it is a multiple of 4 the transfer succeeds but fails for other sizes.
Apparently the omap_hsmmc driver only supports DMA transfers and those require 4 byte alignment.
Does anyone have a hint, solution or workaround for this issue?
...
[ 1080.651519] hci0: open
[ 1080.654083] omap_hsmmc omap_hsmmc.1: context was not lost
[ 1080.659881] omap_hsmmc omap_hsmmc.1: enabled
[ 1080.664367] SDIO: Enabling device mmc1:0001:1...
[ 1080.669281] mmc1: starting CMD52 arg 00000400 flags 00000195
[ 1080.675231] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x00000400
[ 1080.682037] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1080.687255] mmc1: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 1080.694854] mmc1: starting CMD52 arg 80000402 flags 00000195
[ 1080.700836] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x80000402
[ 1080.707672] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1080.712890] mmc1: req done (CMD52): 0: 00001002 00000000 00000000 00000000
[ 1080.720214] mmc1: starting CMD52 arg 00000600 flags 00000195
[ 1080.726196] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x00000600
[ 1080.732971] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1080.738189] mmc1: req done (CMD52): 0: 00001002 00000000 00000000 00000000
[ 1080.747863] SDIO: Enabled device mmc1:0001:1
[ 1080.752471] SDIO: Enabling IRQ for mmc1:0001:1...
[ 1080.757476] mmc1: starting CMD52 arg 00000800 flags 00000195
[ 1080.763427] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x00000800
[ 1080.770233] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1080.775482] mmc1: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 1080.782775] mmc1: starting CMD52 arg 80000803 flags 00000195
[ 1080.788757] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x80000803
[ 1080.795562] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1080.800811] mmc1: req done (CMD52): 0: 00001003 00000000 00000000 00000000
[ 1080.808502] mmc1: starting CMD52 arg 90002801 flags 00000195
[ 1080.814605] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x90002801
[ 1080.821380] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1080.826629] mmc1: req done (CMD52): 0: 00001001 00000000 00000000 00000000
[ 1080.834136] mmc1: IRQ thread started (poll period = 1 jiffies)
[ 1080.840606] Bluetooth: Disabling WT21 deep sleep…
[ 1080.840606]
[ 1080.847412] mmc1: starting CMD52 arg 8001e011 flags 00000195
[ 1080.853393] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x8001e011
[ 1080.860198] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1080.865447] mmc1: req done (CMD52): 0: 00001011 00000000 00000000 00000000
[ 1080.872802] mmc1: starting CMD52 arg 00000a00 flags 00000195
[ 1080.878784] hci0: send_frame
[ 1080.881835] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x00000a00
[ 1080.888641] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1080.893859] mmc1: req done (CMD52): 0: 00001002 00000000 00000000 00000000
[ 1080.901123] hci0: interrupt
[ 1080.904083] mmc1: starting CMD52 arg 10002600 flags 00000195
[ 1080.910064] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x10002600
[ 1080.916839] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1080.922088] mmc1: req done (CMD52): 0: 00001001 00000000 00000000 00000000
[ 1080.929351] mmc1: starting CMD52 arg 90002601 flags 00000195
[ 1080.935302] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x90002601
[ 1080.942108] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1080.947326] mmc1: req done (CMD52): 0: 00001001 00000000 00000000 00000000
[ 1080.954589] hci0: rx_packet
[ 1080.957550] mmc1: starting CMD53 arg 10000004 flags 000001b5
[ 1080.963500] mmc1: blksz 4 blocks 1 flags 00000200 tsac 1000 ms nsac 0
[ 1080.970703] omap_hsmmc omap_hsmmc.1: mmc1: CMD53, argument 0x10000004
[ 1080.977508] omap_hsmmc omap_hsmmc.1: IRQ Status is 3
[ 1080.982757] mmc1: req done (CMD53): 0: 00002000 00000000 00000000 00000000
[ 1080.989990] mmc1: 4 bytes transferred: 0
[ 1080.997192] mmc1: starting CMD53 arg 10000006 flags 000001b5
[ 1081.003143] mmc1: blksz 6 blocks 1 flags 00000200 tsac 1000 ms nsac 0
[ 1081.010314] omap_hsmmc omap_hsmmc.1: MMC start dma failure
[ 1081.016113] mmc1: req done (CMD53): -22: 00000000 00000000 00000000 00000000
[ 1081.023529] mmc1: 0 bytes transferred: -22
[ 1081.028228] mmc1: starting CMD52 arg 90002001 flags 00000195
[ 1081.034179] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x90002001
[ 1081.040985] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1081.046234] mmc1: req done (CMD52): 0: 00001001 00000000 00000000 00000000
[ 1081.053741] hci0: work
[ 1081.056365] hci0: tx_packet
[ 1081.059326] mmc1: starting CMD53 arg 90000007 flags 000001b5
[ 1081.065307] mmc1: blksz 7 blocks 1 flags 00000100 tsac 1000 ms nsac 0
[ 1081.072448] omap_hsmmc omap_hsmmc.1: MMC start dma failure
[ 1081.078247] mmc1: req done (CMD53): -22: 00000000 00000000 00000000 00000000
[ 1081.085662] mmc1: 0 bytes transferred: -22
[ 1081.090362] mmc1: starting CMD52 arg 90002201 flags 00000195
[ 1081.096313] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x90002201
[ 1081.103118] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1081.108337] mmc1: req done (CMD52): 0: 00001001 00000000 00000000 00000000
[ 1081.115814] mmc1: starting CMD52 arg 00000a00 flags 00000195
[ 1081.121826] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x00000a00
[ 1081.128662] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1081.133880] mmc1: req done (CMD52): 0: 00001002 00000000 00000000 00000000
[ 1081.141143] hci0: interrupt
[ 1081.144104] mmc1: starting CMD52 arg 10002600 flags 00000195
[ 1081.150054] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x10002600
[ 1081.156860] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1081.162109] mmc1: req done (CMD52): 0: 00001001 00000000 00000000 00000000
[ 1081.169372] mmc1: starting CMD52 arg 90002601 flags 00000195
[ 1081.175323] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x90002601
[ 1081.182128] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1081.187347] mmc1: req done (CMD52): 0: 00001001 00000000 00000000 00000000
[ 1081.194610] hci0: rx_packet
[ 1081.197540] mmc1: starting CMD53 arg 10000004 flags 000001b5
[ 1081.203521] mmc1: blksz 4 blocks 1 flags 00000200 tsac 1000 ms nsac 0
[ 1081.210693] omap_hsmmc omap_hsmmc.1: mmc1: CMD53, argument 0x10000004
[ 1081.217498] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1086.809783] omap_hsmmc omap_hsmmc.1: IRQ Status is 108000
[ 1086.815490] mmc1: req done (CMD53): 0: 00002000 00000000 00000000 00000000
[ 1086.822723] mmc1: 0 bytes transferred: -110
[ 1086.829040] mmc1: starting CMD52 arg 90002001 flags 00000195
[ 1086.835052] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x90002001
[ 1086.841827] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1086.847076] mmc1: req done (CMD52): 0: 00002001 00000000 00000000 00000000
[ 1086.854583] mmc1: starting CMD52 arg 00000a00 flags 00000195
[ 1086.860534] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x00000a00
[ 1086.867340] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1086.872589] mmc1: req done (CMD52): 0: 00002002 00000000 00000000 00000000
[ 1086.879852] hci0: interrupt
...
[ 1090.872192] hci0: flush
[ 1090.874816] hci0: close
[ 1090.877410] mmc1: starting CMD52 arg 90002800 flags 00000195
[ 1090.883361] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x90002800
[ 1090.890167] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1090.895385] mmc1: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 1090.902679] SDIO: Disabling IRQ for mmc1:0001:1...
[ 1090.907745] mmc1: IRQ thread exiting with code 1
[ 1090.912750] mmc1: starting CMD52 arg 00000800 flags 00000195
[ 1090.918731] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x00000800
[ 1090.925537] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1090.930755] mmc1: req done (CMD52): 0: 00001003 00000000 00000000 00000000
[ 1090.943206] mmc1: starting CMD52 arg 80000800 flags 00000195
[ 1090.950592] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x80000800
[ 1090.957427] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1090.962646] mmc1: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 1090.969940] SDIO: Disabling device mmc1:0001:1...
[ 1090.974914] mmc1: starting CMD52 arg 00000400 flags 00000195
[ 1090.980895] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x00000400
[ 1090.987701] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1090.992919] mmc1: req done (CMD52): 0: 00001002 00000000 00000000 00000000
[ 1091.000183] mmc1: starting CMD52 arg 80000400 flags 00000195
[ 1091.006164] omap_hsmmc omap_hsmmc.1: mmc1: CMD52, argument 0x80000400
[ 1091.012969] omap_hsmmc omap_hsmmc.1: IRQ Status is 1
[ 1091.018188] mmc1: req done (CMD52): 0: 00001000 00000000 00000000 00000000
[ 1091.025451] SDIO: Disabled device mmc1:0001:1
[ 1091.124511] omap_hsmmc omap_hsmmc.1: disabled
Thank you for your help.
Simon