summaryrefslogtreecommitdiffstats
path: root/sys/dev/sdhci/sdhci.h
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2015-01-17 19:57:03 +0000
committerian <ian@FreeBSD.org>2015-01-17 19:57:03 +0000
commitb011ed33bbed20028d149d6090fd65f096b5693f (patch)
tree1881198f953b9ee508b3e61f65f78aa2df5f0575 /sys/dev/sdhci/sdhci.h
parent730949356cff34f3c184fbbbe7beeadd32537c2e (diff)
downloadFreeBSD-src-b011ed33bbed20028d149d6090fd65f096b5693f.zip
FreeBSD-src-b011ed33bbed20028d149d6090fd65f096b5693f.tar.gz
Add a new SDHCI quirk, SDHCI_QUIRK_DONT_SET_HISPD_BIT. Apparently some
sdhci controllers, such as the one on a Raspberry Pi, mishandle the signal timing in high speed signaling mode, but run just fine in standard mode with the bus running at frequencies between 25-50MHz (which shouldn't work). This is the solution adopted by U-Boot and other OSes (linux and *BSD) for the timeouts on Raspberry Pi boards with certain SD cards. Some research shows that this quirk is also used on a few other boards, so the fix is a generic quirk instead of being in the RPi-specific driver code. This change is based on information discovered by Michal Meloun.
Diffstat (limited to 'sys/dev/sdhci/sdhci.h')
-rw-r--r--sys/dev/sdhci/sdhci.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/dev/sdhci/sdhci.h b/sys/dev/sdhci/sdhci.h
index 80479b7..b7d1960 100644
--- a/sys/dev/sdhci/sdhci.h
+++ b/sys/dev/sdhci/sdhci.h
@@ -61,6 +61,8 @@
#define SDHCI_QUIRK_DONT_SHIFT_RESPONSE (1<<13)
/* Wait to see reset bit asserted before waiting for de-asserted */
#define SDHCI_QUIRK_WAITFOR_RESET_ASSERTED (1<<14)
+/* Leave controller in standard mode when putting card in HS mode. */
+#define SDHCI_QUIRK_DONT_SET_HISPD_BIT (1<<15)
/*
* Controller registers
OpenPOWER on IntegriCloud