All of lore.kernel.org
 help / color / mirror / Atom feed
From: biju.das@bp.renesas.com (Biju Das)
To: cip-dev@lists.cip-project.org
Subject: [cip-dev] [PATCH 4.4.y-cip 05/31] mmc: tmio: Add hw reset support
Date: Tue, 19 Nov 2019 13:35:44 +0000	[thread overview]
Message-ID: <1574170570-15179-6-git-send-email-biju.das@bp.renesas.com> (raw)
In-Reply-To: <1574170570-15179-1-git-send-email-biju.das@bp.renesas.com>

From: Ai Kyuse <ai.kyuse.uw@renesas.com>

commit e8f36b5d3b54a49df02c950050659a5082e2c880 upstream.

Add hw reset support.

Signed-off-by: Ai Kyuse <ai.kyuse.uw@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 drivers/mmc/host/tmio_mmc.h     | 1 +
 drivers/mmc/host/tmio_mmc_pio.c | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index d3d24e1..8b4869e 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -167,6 +167,7 @@ struct tmio_mmc_host {
 	int (*start_signal_voltage_switch)(struct mmc_host *mmc,
 					   struct mmc_ios *ios);
 	int (*write16_hook)(struct tmio_mmc_host *host, int addr);
+	void (*hw_reset)(struct tmio_mmc_host *host);
 };
 
 struct tmio_mmc_host *tmio_mmc_host_alloc(struct platform_device *pdev);
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index 0775a19..8bc2ab6 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -791,6 +791,14 @@ static int tmio_mmc_start_data(struct tmio_mmc_host *host,
 	return 0;
 }
 
+static void tmio_mmc_hw_reset(struct mmc_host *mmc)
+{
+	struct tmio_mmc_host *host = mmc_priv(mmc);
+
+	if (host->hw_reset)
+		host->hw_reset(host);
+}
+
 /* Process requests from the MMC layer */
 static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq)
 {
@@ -1007,6 +1015,7 @@ static struct mmc_host_ops tmio_mmc_ops = {
 	.get_cd		= mmc_gpio_get_cd,
 	.enable_sdio_irq = tmio_mmc_enable_sdio_irq,
 	.multi_io_quirk	= tmio_multi_io_quirk,
+	.hw_reset	= tmio_mmc_hw_reset,
 };
 
 static int tmio_mmc_init_ocr(struct tmio_mmc_host *host)
-- 
2.7.4

  parent reply	other threads:[~2019-11-19 13:35 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-19 13:35 [cip-dev] [PATCH 4.4.y-cip 00/31] Add RZ/G1C SD/eMMC support Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 01/31] mmc: tmio-mmc: add support for 32bit data port Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 02/31] mmc: sh_mobile_sdhi: add ocr_mask option Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 03/31] mmc: tmio: enhance illegal sequence handling Biju Das
2019-11-21  0:41   ` Nobuhiro Iwamatsu
2019-11-21  7:42     ` Biju Das
2019-11-21  8:12       ` Pavel Machek
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 04/31] mmc: tmio: document mandatory and optional callbacks Biju Das
2019-11-19 13:35 ` Biju Das [this message]
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 06/31] mmc: core: Add helper to see if a host can be retuned Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 07/31] mmc: tmio: Add tuning support Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 08/31] mmc: sh_mobile_sdhi: " Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 09/31] mmc: tmio: fix wrong bitmask for SDIO irqs Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 10/31] mmc: tmio: remove SDIO from TODO list Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 11/31] mmc: tmio: use SDIO master interrupt bit only when allowed Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 12/31] mmc: sh_mobile_sdhi: simplify accessing DT data Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 13/31] mmc: sh_mobile_sdhi: improve prerequisite for hw_reset Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 14/31] mmc: sh_mobile_sdhi: remove superfluous check in hw_reset Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 15/31] mmc: sh_mobile_sdhi: improve prerequisites for tuning Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 16/31] mmc: sh_mobile_sdhi: remove superfluous check in SCC error check Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 17/31] mmc: sh_mobile_sdhi: remove superfluous check in init_tuning Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 18/31] mmc: sh_mobile_sdhi: enable HS200 Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 19/31] mmc: host: tmio: drop superfluous exit path Biju Das
2019-11-19 13:35 ` [cip-dev] [PATCH 4.4.y-cip 20/31] mmc: tmio: Remove redundant check of mmc->slot.cd_irq Biju Das
2019-11-19 13:36 ` [cip-dev] [PATCH 4.4.y-cip 21/31] mmc: host: tmio: disable clocks when unbinding Biju Das
2019-11-19 13:36 ` [cip-dev] [PATCH 4.4.y-cip 22/31] mmc: host: tmio: refactor calls to sdio irq Biju Das
2019-11-19 13:36 ` [cip-dev] [PATCH 4.4.y-cip 23/31] mmc: host: tmio: SDIO_STATUS_QUIRK is rather SDIO_STATUS_SETBITS Biju Das
2019-11-19 13:36 ` [cip-dev] [PATCH 4.4.y-cip 24/31] mmc: tmio: discard obsolete SDIO irqs before enabling irqs Biju Das
2019-11-19 13:36 ` [cip-dev] [PATCH 4.4.y-cip 25/31] mmc: tmio: ensure end of DMA and SD access are in sync Biju Das
2019-11-19 13:36 ` [cip-dev] [PATCH 4.4.y-cip 26/31] mmc: host: tmio: use defines for CTL_STOP_INTERNAL_ACTION values Biju Das
2019-11-19 13:36 ` [cip-dev] [PATCH 4.4.y-cip 27/31] mmc: host: tmio: don't BUG on unsupported stop commands Biju Das
2019-11-19 13:36 ` [cip-dev] [PATCH 4.4.y-cip 28/31] mmc: host: tmio: fill in response from auto cmd12 Biju Das
2019-11-19 13:36 ` [cip-dev] [PATCH 4.4.y-cip 29/31] mmc: tmio: always get number of taps Biju Das
2019-11-19 13:36 ` [cip-dev] [PATCH 4.4.y-cip 30/31] mmc: tmio: drop filenames from comment at top of source Biju Das
2019-11-19 13:36 ` [cip-dev] [PATCH 4.4.y-cip 31/31] mmc: renesas-sdhi, tmio: make dma more modular Biju Das
2019-11-21  1:13 ` [cip-dev] [PATCH 4.4.y-cip 00/31] Add RZ/G1C SD/eMMC support Nobuhiro Iwamatsu
2019-11-21  8:33 ` Pavel Machek

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=1574170570-15179-6-git-send-email-biju.das@bp.renesas.com \
    --to=biju.das@bp.renesas.com \
    --cc=cip-dev@lists.cip-project.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.