weird SDIO interrupt and SDIO mechanism

claud_yu claud_yu at yahoo.com.tw
Wed May 28 01:47:31 EDT 2008


Hi Tim ,

 Finally I figure out the weird interrupt behavior. The SDIO functionality of linux kernel had be added at linux 2.6.24. 
That is new feature to MMC code that include the host driver or core part. 
I quote some C comments from driver/mmc/core/sdio_irq.c ,  function sdio_irq_thread.

/*
  * We want to allow for SDIO cards to work even on non SDIO
  * aware hosts.  One thing that non SDIO host cannot do is
  * asynchronous notification of pending SDIO card interrupts
  * hence we poll for them in that case.
*/

The core SDIO code use polling mechanism to maintain SDIO functionality, If the host don't have SDIO function. 
And the most important host driver code disable polling mechanism  is below code example.

mmc->caps = MMC_CAP_SDIO_IRQ  ; 

and host driver must provide extra function to enable/disable SDIO interrupt like below.

static void fakehost_enable_sdio_irq(struct mmc_host *mmc, int enable)
{
......
}

static struct mmc_host_ops fakehost_ops = {
        .request = mfakehost_request,
        .set_ios = fakehost_set_ios,
        .enable_sdio_irq = fakehost_enable_sdio_irq,
};


Now only few mmc host drivers have SDIO_IRQ implementation. Like pxamci and sdhci.
If the SDIO host use polling to maintain SDIO , and the performance should be awful.

Claud Yu



--- 08/5/22 (星期四),Tim Harvey <tharvey at irobot.com> 寫道:

> 寄件者: Tim Harvey <tharvey at irobot.com>
> 主旨: Re: weird SDIO interrupt and SDIO mechanism
> 收件者: claud_yu at yahoo.com.tw
> 副本: libertas-dev at lists.infradead.org
> 日期: 2008 5 22 星期四 上午 6:12
> I'm looking at errata for the i.MX31 from
> http://www.freescale.com/files/32bit/doc/errata/MCIMX31CE.pdf?fpsp=1&WT_TYPE=Errata&WT_VENDOR=FREESCALE&WT_FILE_FORMAT=pdf&WT_ASSET=Documentation
> 
> There are a few items for the SDHC module that may explain
> some of the
> following issues there. Specifically I wonder if
> TLSb078667/TLSb091748
> are causing the main driver performance hit as apparently
> the SDHC
> driver needs to do some polling.
> 
> Tim
> 
> claud_yu wrote:
> > Dear All , 
> >
> >    I still stuck at performance issue about SDIO
> 88w8686 and iMX31. And I observe some weird phenomena. 
> > After I insert the libertas SDIO driver, the SDIO
> interface interrupt number rising very fast.  Almost 100
> times per second like kernel tick. The following is log.
> >
> > /modules # cat /proc/interrupts | grep mxcmci  ;sleep
> 1; cat /proc/interrupts | grep mxcmci
> >   9:     309347    MXC_AVIC  mxcmci
> > 108:          4    MXC_GPIO  mxcmci
> >   9:     309450    MXC_AVIC  mxcmci
> > 108:          4    MXC_GPIO  mxcmci
> > /modules #
> >
> > The mxcmci is SDIO interrupt. Is that normal ? 
> > Do the USB and CF interface have the same phenomena ? 
> > I enable the mmc debug and get following mmc
> operation. 
> > That log show some event trigger CMD52 every tick. And
> CMD52 normally use to access the register of SDIO
> peripheral. 
> > That like some thread or event polling someting every
> kernel tick. 
> >


      ______________________________________________________________________________________________________
付費才容量無上限?Yahoo!奇摩電子信箱2.0免費給你,信件永遠不必刪! http://tw.mg0.mail.yahoo.com/dc/landing



More information about the libertas-dev mailing list