linux/drivers/mmc
Kishon Vijay Abraham I 031d2ccc16 mmc: sdhci-omap: Set caps2 to indicate no physical write protect pin
After commit 6d5cd068ee ("mmc: sdhci: use WP GPIO in
sdhci_check_ro()") and commit 39ee32ce48 ("mmc: sdhci-omap: drop
->get_ro() implementation"), sdhci-omap relied on SDHCI_PRESENT_STATE
to check if the card is read-only, if wp-gpios is not populated
in device tree. However SDHCI_PRESENT_STATE in sdhci-omap does not have
correct read-only state.

sdhci-omap can be used by platforms with both micro SD slot and standard
SD slot with physical write protect pin (using GPIO). Set caps2 to
MMC_CAP2_NO_WRITE_PROTECT based on if wp-gpios property is populated or
not.

This fix is required since existing device-tree node doesn't have
"disable-wp" property and to preserve old-dt compatibility.

Fixes: 6d5cd068ee ("mmc: sdhci: use WP GPIO in sdhci_check_ro()")
Fixes: 39ee32ce48 ("mmc: sdhci-omap: drop ->get_ro() implementation")
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2019-03-21 11:19:06 +01:00
..
core for-5.1/block-20190302 2019-03-08 14:12:17 -08:00
host mmc: sdhci-omap: Set caps2 to indicate no physical write protect pin 2019-03-21 11:19:06 +01:00
Kconfig mmc: core: Remove option not to use blk-mq 2017-12-11 12:55:02 +01:00
Makefile mmc: Kconfig: downgrade CONFIG_MMC_DEBUG for host drivers only 2017-08-30 14:01:34 +02:00