Re: [PATCH] mmc: mmci: Improve runtime PM support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 24, 2011 at 11:36 AM, Russell King - ARM Linux
<linux@xxxxxxxxxxxxxxxx> wrote:
> On Sun, Oct 23, 2011 at 02:31:39AM +0200, Sebastian Rasmussen wrote:
>> I guess the patch would appeal more to Russell if mmci_runtime_suspend()
>> only cleared MCIMask0/SDI_MASK0 and MCIClock/SDI_CLKCR and left
>> MCIPower/SDI_PWR unchanged. It may be the case that the signal direction
>> bits need to be cleared for the ST-Ericsson PL180, but I haven't yet verified
>> this on my Snowball dev board yet.
>
> There's also the issue that the specs call for the clock to run after
> a command has completed for a certain number of cycles, and that the
> clock must continue to run until the card reports not-busy after a
> programming or erase cycle has completed - that can be long after the
> previous command has 'completed'.

It's 8 cycles on MCLK required.

I think that is taken care of by this:
pm_runtime_set_autosuspend_delay(mmc->parent, 50);

50 ms is >> 8 MCLK in any practical case, but if we want to
be really, really sure we can always:

#define DEFAULT_DELAY 50
int delay;
delay = DIV_ROUND_UP((1000 * 8), host->mclk); /* 8 MCLK in ms */
delay = max(DEFAULT_DELAY, min_delay);
pm_runtime_set_autosuspend_delay(mmc->parent, delay);

So we have encoded all assumptions.

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux