summaryrefslogtreecommitdiff
path: root/include/linux/mmc
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-05-06 20:31:19 +0200
committerNitin Garg <nitin.garg@nxp.com>2016-01-14 10:59:24 -0600
commitcd1ba3e917cfbb15b66873636ba0c570617d7ae1 (patch)
tree445800192bc0d5c1bb89c73fcf81b63bd9321e50 /include/linux/mmc
parent8b23307d195dd7fb3e73da7c84d3166c2ceaf487 (diff)
mmc: Add support for disabling write-protect detection
It is not uncommon to see systems where there is no physical write-protect signal (e.g. when using eMMC or microSD card slots). For some controllers, which have a dedicated write-protection detection logic (like SDHCI controllers), the get_ro() callback can return bogus data in such a case. Instead of handling this on a per controller basis this patch adds a new capability flag to the MMC core that can be set to specify that the result of get_ro() is invalid. When the flag is set the core will not call get_ro() and assume that the card is always read-write. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 9f6e0bff2afb52a4c29f5ca8a4db01810357974e)
Diffstat (limited to 'include/linux/mmc')
-rw-r--r--include/linux/mmc/host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
index f471193ef6d6..433eccb50838 100644
--- a/include/linux/mmc/host.h
+++ b/include/linux/mmc/host.h
@@ -286,6 +286,7 @@ struct mmc_host {
MMC_CAP2_HS400_1_2V)
#define MMC_CAP2_HSX00_1_2V (MMC_CAP2_HS200_1_2V_SDR | MMC_CAP2_HS400_1_2V)
#define MMC_CAP2_SDIO_IRQ_NOTHREAD (1 << 17)
+#define MMC_CAP2_NO_WRITE_PROTECT (1 << 18) /* No physical write protect pin, assume that card is always read-write */
mmc_pm_flag_t pm_caps; /* supported pm features */