[PATCH 1/1] mmc: Fix mmc_switch excessive timeout
Marek Behún
marek.behun at nic.cz
Thu Oct 14 16:51:32 CEST 2021
Reviewed-by: Marek Behún <marek.behun at nic.cz>
Tested-by: Marek Behún <marek.behun at nic.cz>
This fixes a bug introduced in commit 3f4e52fc9d81
https://source.denx.de/u-boot/u-boot/-/commit/3f4e52fc9d81e95ee90f6be7b05ca62fc8c7c1e3
and it is incorrect. It caused the mmc initialization to take 4 seconds
(previously it was <0.1s).
The code in Linux also uses &&, and the comment says:
If the host doesn't support HW polling via the ->card_busy() ops and
when it's not allowed to poll by using CMD13, then we need to rely on
waiting the stated timeout to be sufficient.
See https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/mmc/core/mmc_ops.c?h=v5.15-rc5#n598
Peng, could we get this merged ASAP? :)
Marek
More information about the U-Boot
mailing list