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.

Need Linux SDIO driver for dm365 (kernel 2.6.18)

Hello,
I am trying to build a Broadcom wireless driver that uses the SDIO interface on the dm365 EVM (via the SD card slot). The driver requires the native Linux SDIO driver which is not included in the 2.6.18 version. For example, it requires the following header files and related functions (from kernel 2.6.24+):
#include <linux/mmc/core.h>
#include <linux/mmc/card.h>
#include <linux/mmc/sdio_func.h>
#include <linux/mmc/sdio_ids.h>

sdio_release_host, sdio_disable_func, sdio_set_block_size, sdio_claim_host, sdio_memcpy_fromio
sdio_register_driver, sdio_readw, sdio_writew, sdio_memcpy_toio, sdio_f0_readb, sdio_release_irq
sdio_f0_writeb, sdio_unregister_driver, sdio_readsb, sdio_readl, sdio_writel, sdio_claim_irq
sdio_enable_func, sdio_readb, sdio_writeb

I tried applying the patches from sdio-linux-2.6.18.tar.gz (SourceForge), but it does not provide the "drivers/mmc/core etc." files/functions above required by the Broadcom driver.

It is my understanding that the SDIO driver for dm365 (2.6.18) will not be available for several months, but we need to evaluate this wireless card sooner than that. I read through these forums and found some discussion on this topic, but no resolutions.

Does anyone have any suggestions or guidance on how to fold this driver into the 2.6.18 kernel for the dm365?
Is there a patch available that does this? Should I try to manually add the sdio files from a vanilla kernel into the dm365 2.6.18 kernel?

Any help would be greatly appreciated. Thanks.

Best regards,
-Craig

  • I believe the best way to handle this if you need the support now would be to backport the mainline changes that added the SDIO support into the existing DM365 LSP kernel, note however that the DM365 is still in the early stages of release so the software stack is still undergoing changes as it is developed, though a more formal beta release of the software stack (DVSDK, LSP, etc) is coming soon, this still means that you may have to go through the backport again if you needed another feature from a newer LSP kernel. An example of this succeeding is for the SDHC driver, you probably already came across this but if not it is a good example of a successfull backport, though I could not say if the SDIO backport would be as easy.

    From the TI side I do not believe there will be a SDIO driver integrated into the TI software stack for some time, likely not until the GIT versions which would mean you would be using the mainline kernel, perhaps later this year.

  • Thanks Bernie. Yes, I am looking at the SDHC example to see if I can do the same for SDIO.

    Are you saying that SDIO will not be part of any LSP/DVSDK release for the dm365?  Therefore, that feature will only be availble when dm365 support is folded in to the davinci git tree?

  • CraigSmith said:
    Are you saying that SDIO will not be part of any LSP/DVSDK release for the dm365?  Therefore, that feature will only be availble when dm365 support is folded in to the davinci git tree?

    No and yes, the long term plan for DVSDK support on the Davinci devices is to use community based Linux (i.e. from the GIT tree) in place of Monta Vista based Linux (though MVL will still be around), so there should be SDIO support with a DVSDK eventually, and that DVSDK will likely be using the GIT kernel. This is hinted at in various places such as the DVSDK download site, but it is still a bit of a ways off so there is no official schedule or much in the way of details.

  • Hi Craig,

    I am also looking for sdio host controller support for 2.6.18 on dm365, saw your similar quarry on this thread.

    please suggest , how many sdio patches you got to backport on 2.6.18 kernel.

     

    Thanks.

     

  • I ended up using this: http://sourceforge.net/projects/sdio-linux/files/

    Regards,

    -Craig

  • Hi Craig,

    Thanks for the information, recently, I walked through the sdio-linux source code, identified that It has no host controller support for davinci dm3xx, something like "linux-davinci/drivers/mmc/host/davinci_mmc.c" available in upstream davinci git tree.

    please suggest, did you ported upstream davinci_mmc.c file in sdio-linux, or used existing controller from stack, or added a new fresh controller from scratch. Also is it handy to port back davinci_mmc.c sdio controller file from upstream to sdio-linux? how many dependancies we need to resolve?

    I am just trying to analyze the back-porting effor , ie. either  back-porting patches from vanilla kernel is easy going or adding dm3xx sdio host support from vanilla to sdio-linux or anything else.

     

    Appreciate your suggestion/help.

    Thanks.

     

  • No, I did not back-port "linux-davinci/drivers/mmc/host/davinci_mmc.c" that is available in upstream davinci git tree.

    I was able to use the sdio-linux host controller "as is" since the wi-fi driver we are using supports this interface.  

    -Craig

  • Hi Craig, 

    I recently tried to back-port upstream davinci_mmc.c host file, It looks to me file "davinci_mmc.c" gives support only for SD/MMC & not for SDIO , As It seems tome SDIO specific host controller methods are not included in host controller driver.

     

    Now I am planning to look in sdio-linux for host controller support, So can you please suggest which host controller you have selected for dm365 sdio controller.

    I find "sdio/hdc/stdhost" may be used for dm365 host controller, but not sure on this part.

     

    Thanks.

     

     

     

  • Hello Craig,

    I am doing a similar thing too. You have ported the host controller driver from here http://sourceforge.net/projects/sdio-linux/files/

    But what about the client drivers needed by Broadcom, where did you get those from?

    Could you please post a link to the client driver code?

    Also, were you successful in your endeavour of getting the Broadcom SDIO card working?

     

    Awaiting a reply,

    Thanks and Regards,

    Jack

     

     

  • The client drivers came from the Broadcom docSAFE system (access granted by our BRCM representative).

    Yes, I did get the SDIO card working. Although I remember there may have been some other patches applied for the Davinci based HCD. I can't find the link to that right now, but I'll look some more and post if I find it.

  • Craig,

    Thanks a lot for your mail.


    On Sun, Dec 6, 2009 at 8:53 PM, TI E2E Community (Beta) - Automated
    Email <no-reply@e2e.ti.com> wrote:
    > Re: Need Linux SDIO driver for dm365 (kernel 2.6.18)
    > By Craig Smith in TMS320DM3x Processors
    >
    > The client drivers came from the Broadcom docSAFE system (access granted by
    > our BRCM representative).

    One other question that's bothering me is, is the client driver the
    "microcode" firmware provided by Broadcom as a bin file? Or is it
    actual code written in .c language? I have this impression that by
    client driver all we require is a sdio-g-cdc-full-blah-blah.bin and
    bcm-blah-blah.txt provided by Broadcom and its loading usage as
    explained in the README.

    Is this assumption of mine correct?


    >
    > Yes, I did get the SDIO card working. Although I remember there may have
    > been some other patches applied for the Davinci based HCD. I can't find the
    > link to that right now, but I'll look some more and post if I find it.

    This would be of immense help to me and I would be ever thankful. I do
    have the host controller source with files such as bcmsdh_linux.c,
    dhd_cdc.c, dhd_sdio.c etc provided by Broadcom. But cannot find the
    client code.

    Thanks and regards,
    Jack

  • There is a .bin firmware file and a .txt NVRAM file that is downloaded to the wifi module using the Dongle Host Driver "dhd" client driver from Broadcom. The dhd driver is build from the dhd_sdioxxxx source code.

  • I believe the "sdiostack" patches I used are located here:

    http://software-dl.ti.com/dsps/dsps_registered_sw/sdo_sb/targetcontent/psp/mv_lsp_1_30/index.html

     

  • hi Craig Smith, i want  ask if you faced with the wireless problem of 'slow'.

    when we use the network based on wireless thought 2.6.18 with the patch above, it's very slow.

    thanks.