sdhci: runtime suspend/resume on card insert/removal
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Sep 10 01:02:33 PDT 2015
On Thu, Sep 10, 2015 at 03:31:29PM +0800, Jisheng Zhang wrote:
> Hi Vaibhav,
>
> On Thu, 10 Sep 2015 12:40:48 +0530
> Vaibhav Hiremath <vaibhav.hiremath at linaro.org> wrote:
>
> > Hi,
> >
> > During my testing of SDHCI-PXAV3 driver on Marvell's pxa1928
> > based platform, I observed that runtime PM suspend/resume is having
> > issues with card insertion and removal.
> >
> > Let me try to explain it using execution sequence -
> >
> > During boot:
> >
> > MMC SD card gets detected as expected.
> >
> > [ 2.431012] mmc1: new high speed SDHC card at address 1234
> > [ 2.437235] mmcblk1: mmc1:1234 SA04G 3.63 GiB
> > [ 2.444841] mmcblk1: p1
> >
> >
> > Now after coming to the linux prompt, if card removal event occurs
> > then the call sequence is -
> >
> > sdhci_irq() -->
> > -> sdhci_thread_irq(): host->thread_isr - 0x80
> > -> sdhci_card_event()
> > -> mmc_detect_change()
> > --> _mmc_detect_change()
> > ---> mmc_sd_detect()
> > mmc_sd_remove()
> > mmc_remove_card()
> > mmc_bus_remove()
> > mmc_power_off()
> > mmc_set_initial_state()
> > sdhci_set_ios()
> > ...
> > sdhci_pxav3_runtime_suspend()
> > sdhci_runtime_suspend_host()
> >
> >
> > Till here everything looks perfect :) (if I got it right)
> >
> > Now on card insertion again, the expectation is, runtime resume should
> > get called as part of interrupt trigger from the SDHCI controller on
> > card insertion.
>
> AFAIK, card insertion => wakeup irq, this irq doesn't come from SDHCI
Wakeup IRQs are what happens when the _system_ is in suspend, not
when the device is runtime suspended.
--
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
More information about the linux-arm-kernel
mailing list