All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
To: ulf.hansson@linaro.org, wsa+renesas@sang-engineering.com
Cc: linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Subject: [PATCH 1/3] mmc: tmio: add init_card ops
Date: Fri, 26 Apr 2019 14:18:48 +0900	[thread overview]
Message-ID: <1556255930-18188-2-git-send-email-yoshihiro.shimoda.uh@renesas.com> (raw)
In-Reply-To: <1556255930-18188-1-git-send-email-yoshihiro.shimoda.uh@renesas.com>

Since renesas_sdhi_internal_dmac driver would like to use
the init_card() ops in the future, this patch adds init_card ops
into the struct tmio_mmc_host and struct tmio_mmc_dma_ops.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
---
 drivers/mmc/host/tmio_mmc.h      | 2 ++
 drivers/mmc/host/tmio_mmc_core.c | 9 +++++++++
 2 files changed, 11 insertions(+)

diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
index c5ba13f..cb2c42b 100644
--- a/drivers/mmc/host/tmio_mmc.h
+++ b/drivers/mmc/host/tmio_mmc.h
@@ -118,6 +118,7 @@ struct tmio_mmc_dma_ops {
 	void (*release)(struct tmio_mmc_host *host);
 	void (*abort)(struct tmio_mmc_host *host);
 	void (*dataend)(struct tmio_mmc_host *host);
+	void (*init_card)(struct tmio_mmc_host *host, struct mmc_card *card);
 };
 
 struct tmio_mmc_host {
@@ -178,6 +179,7 @@ struct tmio_mmc_host {
 	void (*hw_reset)(struct tmio_mmc_host *host);
 	void (*prepare_tuning)(struct tmio_mmc_host *host, unsigned long tap);
 	bool (*check_scc_error)(struct tmio_mmc_host *host);
+	void (*init_card)(struct tmio_mmc_host *host, struct mmc_card *card);
 
 	/*
 	 * Mandatory callback for tuning to occur which is optional for SDR50
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index 130b91c..6019628 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -1047,6 +1047,14 @@ static void tmio_mmc_hs400_complete(struct mmc_host *mmc)
 		host->hs400_complete(host);
 }
 
+static void tmio_mmc_init_card(struct mmc_host *mmc, struct mmc_card *card)
+{
+	struct tmio_mmc_host *host = mmc_priv(mmc);
+
+	if (host->init_card)
+		host->init_card(host, card);
+}
+
 static const struct mmc_host_ops tmio_mmc_ops = {
 	.request	= tmio_mmc_request,
 	.set_ios	= tmio_mmc_set_ios,
@@ -1059,6 +1067,7 @@ static const struct mmc_host_ops tmio_mmc_ops = {
 	.prepare_hs400_tuning = tmio_mmc_prepare_hs400_tuning,
 	.hs400_downgrade = tmio_mmc_hs400_downgrade,
 	.hs400_complete	= tmio_mmc_hs400_complete,
+	.init_card	= tmio_mmc_init_card,
 };
 
 static int tmio_mmc_init_ocr(struct tmio_mmc_host *host)
-- 
2.7.4


  reply	other threads:[~2019-04-26  5:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-26  5:18 [PATCH 0/3] mmc: renesas_sdhi_internal_dmac: improve performance by using IOMMU Yoshihiro Shimoda
2019-04-26  5:18 ` Yoshihiro Shimoda [this message]
2019-04-26  9:15   ` [PATCH 1/3] mmc: tmio: add init_card ops Wolfram Sang
2019-04-26  9:45   ` Simon Horman
2019-04-26  9:56     ` Wolfram Sang
2019-04-26 10:17       ` Simon Horman
2019-04-26  5:18 ` [PATCH 2/3] mmc: tmio: No memory size limitation if runs on IOMMU Yoshihiro Shimoda
2019-04-26  8:09   ` Sergei Shtylyov
2019-04-26  9:17     ` Wolfram Sang
2019-05-07  7:13       ` Yoshihiro Shimoda
2019-04-26  9:45   ` Simon Horman
2019-04-26  5:18 ` [PATCH 3/3] mmc: renesas_sdhi_internal_dmac: use multiple segments if possible Yoshihiro Shimoda
2019-04-26  9:37   ` Wolfram Sang
2019-05-07  7:27     ` Yoshihiro Shimoda
2019-04-26  9:45   ` Simon Horman
2019-04-26  9:46 ` [PATCH 0/3] mmc: renesas_sdhi_internal_dmac: improve performance by using IOMMU Wolfram Sang
2019-05-07  8:58   ` Yoshihiro Shimoda
2019-05-08  4:28     ` Yoshihiro Shimoda

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=1556255930-18188-2-git-send-email-yoshihiro.shimoda.uh@renesas.com \
    --to=yoshihiro.shimoda.uh@renesas.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=wsa+renesas@sang-engineering.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 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.