Commit 4eae8cbd authored by Chunyan Zhang's avatar Chunyan Zhang Committed by Ulf Hansson

mmc: sdhci-sprd: add get_ro hook function

sprd's sd host controller doesn't support write protect to sd card.

Fixes: fb8bd90f ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller")
Signed-off-by: default avatarChunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: default avatarChunyan Zhang <zhang.lyra@gmail.com>
Reviewed-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Tested-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent efdaf275
...@@ -374,6 +374,11 @@ static unsigned int sdhci_sprd_get_max_timeout_count(struct sdhci_host *host) ...@@ -374,6 +374,11 @@ static unsigned int sdhci_sprd_get_max_timeout_count(struct sdhci_host *host)
return 1 << 31; return 1 << 31;
} }
static unsigned int sdhci_sprd_get_ro(struct sdhci_host *host)
{
return 0;
}
static struct sdhci_ops sdhci_sprd_ops = { static struct sdhci_ops sdhci_sprd_ops = {
.read_l = sdhci_sprd_readl, .read_l = sdhci_sprd_readl,
.write_l = sdhci_sprd_writel, .write_l = sdhci_sprd_writel,
...@@ -386,6 +391,7 @@ static struct sdhci_ops sdhci_sprd_ops = { ...@@ -386,6 +391,7 @@ static struct sdhci_ops sdhci_sprd_ops = {
.set_uhs_signaling = sdhci_sprd_set_uhs_signaling, .set_uhs_signaling = sdhci_sprd_set_uhs_signaling,
.hw_reset = sdhci_sprd_hw_reset, .hw_reset = sdhci_sprd_hw_reset,
.get_max_timeout_count = sdhci_sprd_get_max_timeout_count, .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) static void sdhci_sprd_request(struct mmc_host *mmc, struct mmc_request *mrq)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment