mirror of
https://github.com/smaeul/u-boot.git
synced 2025-10-14 12:56:00 +01:00
mmc: zynq_sdhci: Change granularity of timeout to 1us
The timeout used in 'commit b6f44082d5cd ("mmc: zynq_sdhci: Wait till sd card detect state is stable")' workaround is 1000ms at a granularity of 1msec. Change it to 1usec, to not waste time incase the cd is stable. Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/f008d2bcf864702a01564789f14f9cdecb8acd45.1645625609.git.michal.simek@xilinx.com
This commit is contained in:
parent
c252b27747
commit
8d32bca205
@ -770,11 +770,11 @@ static int arasan_sdhci_probe(struct udevice *dev)
|
|||||||
* 1000msec till the card detect state gets stable.
|
* 1000msec till the card detect state gets stable.
|
||||||
*/
|
*/
|
||||||
if (IS_ENABLED(CONFIG_ARCH_VERSAL)) {
|
if (IS_ENABLED(CONFIG_ARCH_VERSAL)) {
|
||||||
u32 timeout = 1000;
|
u32 timeout = 1000000;
|
||||||
|
|
||||||
while (((sdhci_readl(host, SDHCI_PRESENT_STATE) &
|
while (((sdhci_readl(host, SDHCI_PRESENT_STATE) &
|
||||||
SDHCI_CARD_STATE_STABLE) == 0) && timeout) {
|
SDHCI_CARD_STATE_STABLE) == 0) && timeout) {
|
||||||
mdelay(1);
|
udelay(1);
|
||||||
timeout--;
|
timeout--;
|
||||||
}
|
}
|
||||||
if (!timeout) {
|
if (!timeout) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user