summaryrefslogtreecommitdiffstats
path: root/sys/dev/sdhci/sdhci.h
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2016-05-26 02:55:41 +0000
committerian <ian@FreeBSD.org>2016-05-26 02:55:41 +0000
commit9403ae3eaaa5437ade5bd9e341d53ea19ace5b84 (patch)
treef88aace359e8365bc9e1e7d82eb3d231f4666efd /sys/dev/sdhci/sdhci.h
parent48b6d2c8b7c6aa6df4bf6cc5c1f107869764b5f3 (diff)
downloadFreeBSD-src-9403ae3eaaa5437ade5bd9e341d53ea19ace5b84.zip
FreeBSD-src-9403ae3eaaa5437ade5bd9e341d53ea19ace5b84.tar.gz
Add a convenience macro that masks all the bits related to clock divisors
in all versions of the sdhci spec (the HI bits are just unused reserved bits in earlier versions).
Diffstat (limited to 'sys/dev/sdhci/sdhci.h')
-rw-r--r--sys/dev/sdhci/sdhci.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/sdhci/sdhci.h b/sys/dev/sdhci/sdhci.h
index 7683c1d..2638b4f 100644
--- a/sys/dev/sdhci/sdhci.h
+++ b/sys/dev/sdhci/sdhci.h
@@ -153,6 +153,9 @@
#define SDHCI_CLOCK_CARD_EN 0x0004
#define SDHCI_CLOCK_INT_STABLE 0x0002
#define SDHCI_CLOCK_INT_EN 0x0001
+#define SDHCI_DIVIDERS_MASK \
+ ((SDHCI_DIVIDER_MASK << SDHCI_DIVIDER_SHIFT) | \
+ (SDHCI_DIVIDER_HI_MASK << SDHCI_DIVIDER_HI_SHIFT))
#define SDHCI_TIMEOUT_CONTROL 0x2E
OpenPOWER on IntegriCloud