From: Chaotian Jing <chaotian.jing@mediatek.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
Krzysztof Kozlowski <k.kozlowski@samsung.com>,
Seungwon Jeon <tgih.jun@samsung.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
linux-kernel@vger.kernel.org, Minda Chen <Minda.Chen@csr.com>,
Dong Aisheng <b29396@freescale.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Weijun Yang <Weijun.Yang@csr.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
linux-samsung-soc@vger.kernel.org,
Howard Chen <ibanezchen@gmail.com>, Kukjin Kim <kgene@kernel.org>,
linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org,
ivan.ivanov@linaro.org, devicetree@vger.kernel.org,
Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Sascha Hauer <s.hauer@pengutronix.de>,
Hans de Goede <hdegoede@redhat.com>,
Rob Herring <robh+dt@kernel.org>,
linux-mediatek@lists.infradead.org, Matthias Brugger <matthias>
Subject: [PATCH v2 6/9] mmc: mediatek: add implement of ops->hw_reset()
Date: Tue, 20 Oct 2015 17:13:08 +0800 [thread overview]
Message-ID: <1445332391-30530-7-git-send-email-chaotian.jing@mediatek.com> (raw)
In-Reply-To: <1445332391-30530-1-git-send-email-chaotian.jing@mediatek.com>
add implement of ops->hw_reset() for eMMC
Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
---
drivers/mmc/host/mtk-sd.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 3858163..5627644 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -64,6 +64,7 @@
#define SDC_RESP2 0x48
#define SDC_RESP3 0x4c
#define SDC_BLK_NUM 0x50
+#define EMMC_IOCON 0x7c
#define SDC_ACMD_RESP 0x80
#define MSDC_DMA_SA 0x90
#define MSDC_DMA_CTRL 0x98
@@ -1209,6 +1210,15 @@ end:
pm_runtime_put_autosuspend(host->dev);
}
+static void msdc_hw_reset(struct mmc_host *mmc)
+{
+ struct msdc_host *host = mmc_priv(mmc);
+
+ sdr_set_bits(host->base + EMMC_IOCON, 1);
+ udelay(10); /* 10us is enough */
+ sdr_clr_bits(host->base + EMMC_IOCON, 1);
+}
+
static struct mmc_host_ops mt_msdc_ops = {
.post_req = msdc_post_req,
.pre_req = msdc_pre_req,
@@ -1216,6 +1226,7 @@ static struct mmc_host_ops mt_msdc_ops = {
.set_ios = msdc_ops_set_ios,
.start_signal_voltage_switch = msdc_ops_switch_volt,
.card_busy = msdc_card_busy,
+ .hw_reset = msdc_hw_reset,
};
static int msdc_drv_probe(struct platform_device *pdev)
--
1.8.1.1.dirty
next prev parent reply other threads:[~2015-10-20 9:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-20 9:13 [PATCH v2 0/9] Add tune support of Mediatek MMC driver Chaotian Jing
2015-10-20 9:13 ` [PATCH v2 1/9] mmc: core: Add DT bindings for eMMC hardware reset support Chaotian Jing
2015-10-20 9:13 ` [PATCH v2 2/9] mmc: dt-bindings: update Mediatek MMC bindings Chaotian Jing
2015-10-20 9:13 ` [PATCH v2 3/9] mmc: mediatek: make cmd_ints_mask to const Chaotian Jing
2015-10-20 9:13 ` [PATCH v2 4/9] mmc: mediatek: change the argument "ddr" to "timing" Chaotian Jing
2015-10-20 9:13 ` [PATCH v2 5/9] mmc: mediatek: fix got GPD checksum error interrupt when data transfer Chaotian Jing
2015-10-20 9:13 ` Chaotian Jing [this message]
2015-10-20 9:13 ` [PATCH v2 7/9] mmc: mmc: extend the mmc_send_tuning() Chaotian Jing
2015-10-20 9:13 ` [PATCH v2 8/9] mmc: mediatek: add HS400 support Chaotian Jing
2015-10-20 9:13 ` [PATCH v2 9/9] arm64: dts: mediatek: add HS200/HS400/SDR50/SDR104 support Chaotian Jing
2015-10-20 16:41 ` [PATCH v2 0/9] Add tune support of Mediatek MMC driver Ulf Hansson
[not found] ` <CAPDyKFrTrR5U7QoXpiWj29bUD5SEp4ccbx8qNs9HF0cYxuqdBw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-10-22 2:18 ` Chaotian Jing
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=1445332391-30530-7-git-send-email-chaotian.jing@mediatek.com \
--to=chaotian.jing@mediatek.com \
--cc=Minda.Chen@csr.com \
--cc=Weijun.Yang@csr.com \
--cc=b29396@freescale.com \
--cc=catalin.marinas@arm.com \
--cc=devicetree@vger.kernel.org \
--cc=hdegoede@redhat.com \
--cc=ibanezchen@gmail.com \
--cc=ijc+devicetree@hellion.org.uk \
--cc=ivan.ivanov@linaro.org \
--cc=jh80.chung@samsung.com \
--cc=k.kozlowski@samsung.com \
--cc=kgene@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=tgih.jun@samsung.com \
--cc=ulf.hansson@linaro.org \
--cc=will.deacon@arm.com \
/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