[U-Boot] [PATCH] mmc: sdhci: Avoid commands errors by simple timeout adaptation.
Przemyslaw Marczak
p.marczak at samsung.com
Tue Oct 1 18:59:14 CEST 2013
Hello Pantelis,
Thank you for reply
On 10/01/2013 05:50 PM, Pantelis Antoniou wrote:
> while (sdhci_readl(host, SDHCI_PRESENT_STATE) & mask) {
> - if (timeout == 0) {
> + if (time == cmd_timeout) {
> time >= cmd_timeout here.
>
> You rely on the timeout hitting exactly the same value which is not
> guaranteed.
I think this condition is guaranteed here, because of "time" value that
is incremented only inside the loop.
Also if meets (time == cmd_timeout) condition and next if timeout will
be increased twice, then eg. if current timeout
is 100ms -> next will be 200 ms, so it needs 100 loops and no more.
Am I wrong?
Regards
--
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
More information about the U-Boot
mailing list