This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Using MMC2 on AM3352 in Linux 3.14.22

Other Parts Discussed in Thread: AM3352, WL1271

Does the OMAP MMC driver in the standard Linux distribution (using 3.14.22) support crossbar-mapped DMA channels?

I want to use the SDIO interface on MMC2 of the AM3352 CPU, but when I enabled it in the DTS file, the device driver is not loaded by the MMC driver and the following messages can be found in dmesg:

[    0.206050] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
[    1.836901] of_dma_request_slave_channel: dma-names property of node '/ocp/mmc@47810000' missing or empty
[    1.847114] omap_hsmmc 47810000.mmc: unable to obtain RX DMA engine channel 3745325992

I have done some research and found that it appears that:
1) The OMAP MMC driver does not support crossbar-mapped DMA channels (used on MMC2).
2) Polling is not supported by the OMAP MMC driver.

Is this correct? If so, it would seem the driver doesn't really support use of MMC2.

Options?

Mike

PS. I tried using some of the XBAR options in the DTS as suggested by postings here.

The MMC driver is able to do SDIO sequential reads to identify the SDIO device as the WL1271.

But the DMA driver stalls when attempting to load the firmware using block transfers.

  • [ 240.566493] INFO: task kworker/0:0:4 blocked for more than 120 seconds.
    [ 240.573522] Not tainted 3.14.22+ #10
    [ 240.577955] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [ 240.586220] kworker/0:0 D c06338e4 0 4 2 0x00000000
    [ 240.586331] Workqueue: events request_firmware_work_func
    [ 240.586474] [<c06338e4>] (__schedule) from [<c0633024>] (schedule_timeout+0x1bc/0x248)
    [ 240.586524] [<c0633024>] (schedule_timeout) from [<c06346e0>] (wait_for_common+0xcc/0x174)
    [ 240.586572] [<c06346e0>] (wait_for_common) from [<c04b6078>] (mmc_wait_for_req_done+0x6c/0xf0)
    [ 240.586632] [<c04b6078>] (mmc_wait_for_req_done) from [<c04c0098>] (mmc_io_rw_extended+0x2e4/0x330)
    [ 240.586684] [<c04c0098>] (mmc_io_rw_extended) from [<c04c132c>] (sdio_io_rw_ext_helper+0x12c/0x19c)
    [ 240.586732] [<c04c132c>] (sdio_io_rw_ext_helper) from [<c04c14e8>] (sdio_memcpy_toio+0x24/0x2c)
    [ 240.586820] [<c04c14e8>] (sdio_memcpy_toio) from [<bf079180>] (wl12xx_sdio_raw_write+0x74/0x130 [wlcore_sdio])
    [ 240.587099] [<bf079180>] (wl12xx_sdio_raw_write [wlcore_sdio]) from [<bf1d4708>] (wlcore_set_partition+0xb4/0x3d8 [wlcore])
    [ 240.587295] [<bf1d4708>] (wlcore_set_partition [wlcore]) from [<bf1c920c>] (wl12xx_set_power_on+0x70/0x11c [wlcore])
    [ 240.587464] [<bf1c920c>] (wl12xx_set_power_on [wlcore]) from [<bf1cf824>] (wlcore_nvs_cb+0x154/0x90c [wlcore])
    [ 240.587587] [<bf1cf824>] (wlcore_nvs_cb [wlcore]) from [<c03dc5d8>] (request_firmware_work_func+0x30/0x50)
    [ 240.587650] [<c03dc5d8>] (request_firmware_work_func) from [<c0058a9c>] (process_one_work+0x148/0x3ec)
    [ 240.587697] [<c0058a9c>] (process_one_work) from [<c00597fc>] (worker_thread+0x13c/0x404)
    [ 240.587743] [<c00597fc>] (worker_thread) from [<c005ef60>] (kthread+0xd4/0xec)
    [ 240.587796] [<c005ef60>] (kthread) from [<c000e2f8>] (ret_from_fork+0x14/0x3c)
  • Hi Michael,

    Kernel 3.14 is not supported at this time. Latest kernel release that's supported by TI is 3.12.10.

  • Thanks for your response, Biser.

    I mistakenly concluded that 'no future SW release for WL1271' meant that it would not work with SDK v7.0.
    So, since our customers wanted newer kernel version, I did not use SDK v6.0.
    So I tried to roll my own...

    But, let me ask this. Are you saying that if I used SDK v7.0 you know for sure that the WL1271 works on MMC2 using the crossbar-mapped DMA? Do you know of any customer that has done this, out of box, with SDK v7.0?

    Thanks for your help!

    Mike
  • Hi Mike,

    MMC2 is completely identical to the other MMC interfaces. As for "out of the box" I can't say really. I suppose at least MMC2 initialization and pinmuxing should be added. You can also ask on the WiLink forum: http://e2e.ti.com/support/wireless_connectivity/f/307

  • MMC2 is NOT identical to MMC0/1 - See ch.11 of TRM.
    Pinmux is fine. See posts above. MMC driver is identifying device and loading WLC1271 driver.

    The WL1271 driver stalls when attempting to load firmware.
     
    Mike

  • Here's a snippet from arch/arm/boot/dts/am335x-evm.dts of SDK 7.00:

    &mmc3 {
            /* these are on the crossbar and are outlined in the
               xbar-event-map element */
            dmas = <&edma 12
                    &edma 13>;
            dma-names = "tx", "rx";
    
            status = "okay";
            vmmc-supply = <&wlan_en_reg>;
            bus-width = <4>;
            ti,non-removable;
            ti,needs-special-hs-handling;
            cap-power-off-card;
            keep-power-in-suspend;
    };
    
    &edma {
            ti,edma-xbar-event-map = <1 12
                                      2 13>;
    };
    

    They mention "mmc3" above though the file (confusingly) labels the 3 MMC ports as 1, 2, 3 rather than 0, 1, 2 as they are called in the data manual.  SDK 7.00 is built to work with WL8, but following a similar process I expect you should be able to get it working with WL6.

    You'll likely get better help from TI if you use SDK 7.00.

  • Hi Mike, and TI Brad & Biser

    Based on Mike's initial assumptions:

    1) The OMAP MMC driver does not support crossbar-mapped DMA channels (used on MMC2).

    I tried to find details on this being different for mmc2 (vs. 0 & 1) in the TRM but couldn't. Would be great with some more info and an update on your latest findings.

    2) Polling is not supported by the OMAP MMC driver.

    This would be in the TI mmc driver, right? Not sure why it's not in there. I assume you've tried pushing 50mbit+ data and seen the huge wl_irq load right?

    How about this: http://www.spinics.net/lists/linux-mmc/msg26863.html

    /David

  • bumping this one. any updates?

    would be interesting if anyone can share profiling data with polling vs in band interrupt.
  • Since this discussion started, SDK 8.00 has been released which is based on a 3.14.26 kernel. It contains the same crossbar capabilities as I mentioned in the context of SDK 7.00. The SDK is already built to work out of the box with our WL18xx devices.