diff options
author | Chunyan Zhang <chunyan.zhang@unisoc.com> | 2019-08-28 10:17:33 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-09-06 10:23:49 +0200 |
commit | e27fc344575113db956cb9c0ae0b13312a7e1dcc (patch) | |
tree | e5641241582bb1797731ac82ede684da777a0f1e /drivers/mmc | |
parent | 9ad0348f708d7b2ceead282f558a6a16a213d9b9 (diff) | |
download | linux-stable-e27fc344575113db956cb9c0ae0b13312a7e1dcc.tar.gz linux-stable-e27fc344575113db956cb9c0ae0b13312a7e1dcc.tar.bz2 linux-stable-e27fc344575113db956cb9c0ae0b13312a7e1dcc.zip |
mmc: sdhci-sprd: add get_ro hook function
[ Upstream commit 4eae8cbdff942a423926486be4e781a77d619966 ]
sprd's sd host controller doesn't support write protect to sd card.
Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller")
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Chunyan Zhang <zhang.lyra@gmail.com>
Reviewed-by: Baolin Wang <baolin.wang@linaro.org>
Tested-by: Baolin Wang <baolin.wang@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci-sprd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index 1c5e6b77ca64..fc892a8d882f 100644 --- a/drivers/mmc/host/sdhci-sprd.c +++ b/drivers/mmc/host/sdhci-sprd.c @@ -291,6 +291,11 @@ static unsigned int sdhci_sprd_get_max_timeout_count(struct sdhci_host *host) return 1 << 31; } +static unsigned int sdhci_sprd_get_ro(struct sdhci_host *host) +{ + return 0; +} + static struct sdhci_ops sdhci_sprd_ops = { .read_l = sdhci_sprd_readl, .write_l = sdhci_sprd_writel, @@ -303,6 +308,7 @@ static struct sdhci_ops sdhci_sprd_ops = { .set_uhs_signaling = sdhci_sprd_set_uhs_signaling, .hw_reset = sdhci_sprd_hw_reset, .get_max_timeout_count = sdhci_sprd_get_max_timeout_count, + .get_ro = sdhci_sprd_get_ro, }; static void sdhci_sprd_request(struct mmc_host *mmc, struct mmc_request *mrq) |