summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linaro.org>2019-06-04 16:14:24 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-06 10:23:49 +0200
commit9ad0348f708d7b2ceead282f558a6a16a213d9b9 (patch)
tree9938000d7a26d397f46ba804c64678d47f02c2b7 /drivers/mmc
parentd100666e3cfc93956a357b18941e493f265f85ec (diff)
downloadlinux-stable-9ad0348f708d7b2ceead282f558a6a16a213d9b9.tar.gz
linux-stable-9ad0348f708d7b2ceead282f558a6a16a213d9b9.tar.bz2
linux-stable-9ad0348f708d7b2ceead282f558a6a16a213d9b9.zip
mmc: sdhci-sprd: Implement the get_max_timeout_count() interface
[ Upstream commit 7486831d7d6aebcf851f9a4bbe65080351d5c9fb ] Implement the get_max_timeout_count() interface to set the Spredtrum SD host controller actual maximum timeout count. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Acked-by: Adrian Hunter <adrian.hunter@intel.com> 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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
index 9d0f58a66527..1c5e6b77ca64 100644
--- a/drivers/mmc/host/sdhci-sprd.c
+++ b/drivers/mmc/host/sdhci-sprd.c
@@ -285,6 +285,12 @@ static void sdhci_sprd_hw_reset(struct sdhci_host *host)
usleep_range(300, 500);
}
+static unsigned int sdhci_sprd_get_max_timeout_count(struct sdhci_host *host)
+{
+ /* The Spredtrum controller actual maximum timeout count is 1 << 31 */
+ return 1 << 31;
+}
+
static struct sdhci_ops sdhci_sprd_ops = {
.read_l = sdhci_sprd_readl,
.write_l = sdhci_sprd_writel,
@@ -296,6 +302,7 @@ static struct sdhci_ops sdhci_sprd_ops = {
.reset = sdhci_reset,
.set_uhs_signaling = sdhci_sprd_set_uhs_signaling,
.hw_reset = sdhci_sprd_hw_reset,
+ .get_max_timeout_count = sdhci_sprd_get_max_timeout_count,
};
static void sdhci_sprd_request(struct mmc_host *mmc, struct mmc_request *mrq)