summaryrefslogtreecommitdiffstats
path: root/sys/dev/sdhci/sdhci.h
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2015-05-21 20:09:36 +0000
committerloos <loos@FreeBSD.org>2015-05-21 20:09:36 +0000
commitdd5257f7d01d3ae28899417a214d9bfa5a94f0bf (patch)
treedac302b6ab37b478f088edfdcd5474b2bc35db17 /sys/dev/sdhci/sdhci.h
parentd8ed876b187c8092bdd7945b04083327db53a54e (diff)
downloadFreeBSD-src-dd5257f7d01d3ae28899417a214d9bfa5a94f0bf.zip
FreeBSD-src-dd5257f7d01d3ae28899417a214d9bfa5a94f0bf.tar.gz
Raise the SDHCI timeout to 10 seconds and add a sysctl to allow changing
this value at runtime. The SD card specification says that a block write or a block erase can take up to 250ms to complete and thus, under some circumstances, the existent 2 seconds timeout was triggering with normal usage. This change fixes the sporadic controller timeout that happens on RPi and RPi 2. Discussed with: ian (some time ago)
Diffstat (limited to 'sys/dev/sdhci/sdhci.h')
-rw-r--r--sys/dev/sdhci/sdhci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/dev/sdhci/sdhci.h b/sys/dev/sdhci/sdhci.h
index b7d1960..3c27d0c 100644
--- a/sys/dev/sdhci/sdhci.h
+++ b/sys/dev/sdhci/sdhci.h
@@ -271,6 +271,7 @@ struct sdhci_slot {
#define SDHCI_HAVE_DMA 1
#define SDHCI_PLATFORM_TRANSFER 2
u_char version;
+ int timeout; /* Transfer timeout */
uint32_t max_clk; /* Max possible freq */
uint32_t timeout_clk; /* Timeout freq */
bus_dma_tag_t dmatag;
OpenPOWER on IntegriCloud