From: Chunyan Zhang <zhang.lyra@gmail.com>
To: Ulf Hansson <ulf.hansson@linaro.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Orson Zhai <orsonzhai@gmail.com>,
Baolin Wang <baolin.wang@linaro.org>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
Chunyan Zhang <zhang.lyra@gmail.com>
Subject: [PATCH 2/5] mmc: sdhci-sprd: add get_ro hook function
Date: Mon, 26 Aug 2019 11:18:27 +0800 [thread overview]
Message-ID: <20190826031830.30931-3-zhang.lyra@gmail.com> (raw)
In-Reply-To: <20190826031830.30931-1-zhang.lyra@gmail.com>
From: Chunyan Zhang <chunyan.zhang@unisoc.com>
sprd's sd host controller doesn't support write protect to sd card.
Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Signed-off-by: Chunyan Zhang <zhang.lyra@gmail.com>
---
drivers/mmc/host/sdhci-sprd.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c
index d5871865a1e9..90cb2af91159 100644
--- a/drivers/mmc/host/sdhci-sprd.c
+++ b/drivers/mmc/host/sdhci-sprd.c
@@ -374,6 +374,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,
@@ -386,6 +391,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)
--
2.20.1
next prev parent reply other threads:[~2019-08-26 3:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 3:18 [PATCH 0/5] a few fixes for sprd's sd host controller Chunyan Zhang
2019-08-26 3:18 ` [PATCH 1/5] mmc: sdhci-sprd: fixed incorrect clock divider Chunyan Zhang
2019-08-26 3:18 ` Chunyan Zhang [this message]
2019-08-26 3:18 ` [PATCH 3/5] mmc: sdhci-sprd: add SDHCI_QUIRK2_PRESET_VALUE_BROKEN Chunyan Zhang
2019-08-26 3:18 ` [PATCH 4/5] mms: sdhci-sprd: add SDHCI_QUIRK_BROKEN_CARD_DETECTION Chunyan Zhang
2019-08-26 3:18 ` [PATCH 5/5] mmc: sdhci-sprd: clear the UHS-I modes read from registers Chunyan Zhang
2019-08-26 5:56 ` [PATCH 0/5] a few fixes for sprd's sd host controller Baolin Wang
2019-08-27 13:46 ` Ulf Hansson
2019-08-28 2:01 ` Chunyan Zhang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190826031830.30931-3-zhang.lyra@gmail.com \
--to=zhang.lyra@gmail.com \
--cc=adrian.hunter@intel.com \
--cc=baolin.wang@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=orsonzhai@gmail.com \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).