sdhci can turn off irq up to 200 ms
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 21 lines · Matthieu CASTET
Quoted 18 lines · Matthieu CASTET
Hi,
sdhci code got tasklets (
sdhci_tasklet_cardandsdhci_tasklet_finish), that does :
{spin_lock_irqsaveif (cond) {
sdhci_resetsdhci_reset
}
spin_unlock_irqrestore
}The problem is that
sdhci_reset[1] does busy pooling on a register up to a timeout of 100 ms.
That's not low latency friendly.
Quoted 7 lines
Quoted 4 lines
On our system, we saw that
sdhci_resettake 1 ms. That should be because we enter in mdelay, even if the hardware clears the bit faster. I wonder why there is an mdelay(1). Usingcpu_relaxandtime_is_after_jiffiesshould makesdhci_resetfaster.In case somebody cares, here a patch that reduce on our hardware
sdhci_resetfrom 1 ms to 30 us.
On my Core2Duo, cpu_relax (implementing rep;nop) takes 3.2ns, but a (synchronous) read over the PCI bus takes 0.5-1us, so it's hard to say how much benefit the cpu_relax call will give, or am I missing something?
If the code is reading from a memory location, or perhaps writing to non-writethrough memory, it's a different story.
Daniel
--
Daniel J Blueman