[U-Boot] [PATCH 1/3] mmc: sdhci: increase the timeout value for data transfer

Rommel Custodio sessyargc+uboot at gmail.com
Mon Sep 24 04:34:31 CEST 2012


Hello Jaehoon,

> I didn't think so..Our environment is support the
> CONFIG_SYS_MMC_MAX_BLK_COUNT.

This is defined in mmc.c right after the include definitions.
The comment says that:
  Set block count limit because of 16 bit
  register limit on some hardware

So my use of this define is a bit of a hack too.


> Did you know how get the timeout value "1000"?
> 
> If the timeout value "1000" is reasonable, i want
> to know what basis. Well, i don't think that my
> timeout value is reasonable.

I think timeout value was from original creator/maintainer
of SD/MMC code.

When trying to read big data off of the SD card, I get the
timeout too on my platform (ml507). My test consist of reading
a 26Mb file from the SD card in PIO and DMA mode.

When the timeout is displayed in the serial console, the block
count register is not yet zero but there is no error in the
interrupt status register. The block count value shows the
same value when I perform the same test.

For my use, CONFIG_SYS_MMC_MAX_BLK_COUNT = 0x1000 in my
environment. I did not modify any of the timeout values.


> 
> Actually i want to remove the timeout value in that function.
> But then we should be prevent the infinite loop.

The infinite loop that you mention does not occur in my
situation.

> 
> Anyway, thanks for your comment. I will check the your opinion.

HTH

(replying via gmane since i just joined the list)



More information about the U-Boot mailing list