Messages in this thread | | | Date | Mon, 23 Jul 2012 10:19:16 +0100 | Subject | Re: [PATCH] mmc: dw_mmc: Disable low power mode if SDIO interrupts are used | From | Will Newton <> |
| |
On Mon, Jul 23, 2012 at 3:48 AM, Doug Anderson <dianders@chromium.org> wrote: > On Sat, Jul 21, 2012 at 3:40 AM, Will Newton <will.newton@gmail.com> wrote: >>> static void dw_mci_enable_sdio_irq(struct mmc_host *mmc, int enb) >>> { >>> struct dw_mci_slot *slot = mmc_priv(mmc); >>> @@ -871,6 +896,14 @@ static void dw_mci_enable_sdio_irq(struct mmc_host *mmc, int enb) >>> /* Enable/disable Slot Specific SDIO interrupt */ >>> int_mask = mci_readl(host, INTMASK); >>> if (enb) { >>> + /* >>> + * Turn off low power mode if it was enabled. This is a bit of >>> + * a heavy operation and we disable / enable IRQs a lot, so >>> + * we'll leave them disabled; they will get re-enabled again in >>> + * dw_mci_setup_bus(). >>> + */ >>> + dw_mci_disable_low_power(mmc); >>> + >> >> Is it safe to just disable low power here or could the setting be >> overwritten in setup_bus? > > Very good question. In my current setup I don't see setup_bus() > called during normal operation. If it were, my kernel messages would > be constantly spammed with messages like: > Bus speed (slot %d) = %dHz (slot req %dHz, actual %dHZ div = %d) > > ...and they're not. Things may be different with different SDIO cards perhaps?
Yeah I think setup_bus should only setup the card clock once at startup but it may also be required on resume?
I should probably mention I have not tested this driver with any SDIO devices, although I believe there are other people out there who do!
| |