On Thu, Oct 27, 2011 at 08:02:13AM +0200, Wolfram Sang wrote: > >> Even there are some SDHCI hardwares cannot be stable in microseconds, I >> think this is also OK since they just need to wait for a few more loops. The >> total waiting time is the same as before. > >Well, I still think this is curing the symptoms not the cause. But will talk >with Chris about it since we are both in Prague at the moment... Hi Wolfram & Chris, This issue was found by using ftrace to track the irqsoff latency. Each time to call mmc_power_off, the latency is about 1ms on my platform. And this 1ms delay is causing by the mdelay(1) in _set_ios. You know, after changing some register like CLOCK_CONTROL or RESET, driver will start to check them every 1ms since we are using mdelay(1). For some devices, it needn't software to wait for 1ms, but only some milliseconds. So I think change to use udelay() is much better for those devices. How do you think? Can you give some of your advice? Thank you. Best Regards Shawn -- 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