[U-Boot] [PATCH 1/2] mmc: dw_mmc: Increase timeout to 20 seconds
Alexey Brodkin
Alexey.Brodkin at synopsys.com
Mon Sep 14 12:30:51 CEST 2015
On Fri, 2015-09-11 at 23:45 +0200, Lukasz Majewski wrote:
> Hi Alexey,
> > FWIW I faced similar problem even reading data.
> > At least on one of my boards reading of ~8Mb file
> > took ~1.7 seconds and so 1 second timeout was interrupting data
> > exchange.
>
> Was it SD card or eMMC device?
It was external SD-card.
> >
> > So indeed we need to have some dirty hack for upcoming release
> > like bumping timeout to something really huge but later we
> > need to fix that problem properly.
> >
> > I though proper solution would be to set timeout depending of amount
> > of data to be exchanged... something like take slowest speed of SD/MMC
> > that is allowed by spec and calculate delay based on how much time it
> > might take for that slow device and for safety multiply it by say 2.
>
> As fair as I remember, card provide this kind of information. We can
> try to investigate this possibility.
I'm pretty sure card may report a lot of info about itself.
And if we look at what people do in Linux kernel we may see calculations
of different timeouts in "drivers/mmc/core/core.c".
But keeping in mind we're not writing another OS kernel but we're just
dealing with bootloader I'd prefer to keep things simple and do check
only critical things like totally broken HW. I.e. something simple should
be enough for U-Boot.
> >
> > Now from this thread I see that there're other reasons that might
> > affect length of at least write operation. In other words it could be
> > complicated unfortunately.
-Alexey
More information about the U-Boot
mailing list