All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yuvaraj Kumar C D <yuvaraj.cd@gmail.com>
To: linux-mmc@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	cjb@laptop.org, jh80.chung@samsung.com, tgih.jun@samsung.com
Cc: ks.giri@samsung.com, t.figa@samsung.com, alim.akhtar@samsung.com,
	Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>
Subject: [RFC V3 3/4] mmc: dw_mmc: move the platform specific init call
Date: Wed, 28 Aug 2013 17:38:50 +0530	[thread overview]
Message-ID: <1377691731-7226-4-git-send-email-yuvaraj.cd@samsung.com> (raw)
In-Reply-To: <1377691731-7226-1-git-send-email-yuvaraj.cd@samsung.com>

Current platform specific private data initialisation call
dw_mci_exynos_priv_init can be used to do platform specific
initialisation of SMU and others in future.So the drv_data->init
call has moved to dw_mci_probe.

changes since V2: none
changes since V1: none

Signed-off-by: Yuvaraj Kumar C D <yuvaraj.cd@samsung.com>
---
 drivers/mmc/host/dw_mmc-pltfm.c |    7 -------
 drivers/mmc/host/dw_mmc.c       |    9 +++++++++
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c
index 2089752..5c49656 100644
--- a/drivers/mmc/host/dw_mmc-pltfm.c
+++ b/drivers/mmc/host/dw_mmc-pltfm.c
@@ -39,7 +39,6 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
 {
 	struct dw_mci *host;
 	struct resource	*regs;
-	int ret;
 
 	host = devm_kzalloc(&pdev->dev, sizeof(struct dw_mci), GFP_KERNEL);
 	if (!host)
@@ -59,12 +58,6 @@ int dw_mci_pltfm_register(struct platform_device *pdev,
 	if (IS_ERR(host->regs))
 		return PTR_ERR(host->regs);
 
-	if (drv_data && drv_data->init) {
-		ret = drv_data->init(host);
-		if (ret)
-			return ret;
-	}
-
 	platform_set_drvdata(pdev, host);
 	return dw_mci_probe(host);
 }
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index beafb4c..0edec01 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2221,6 +2221,15 @@ int dw_mci_probe(struct dw_mci *host)
 		host->bus_hz = clk_get_rate(host->ciu_clk);
 	}
 
+	if (drv_data && drv_data->init) {
+		ret = drv_data->init(host);
+		if (ret) {
+			dev_err(host->dev,
+				"implementation specific init failed\n");
+			goto err_clk_ciu;
+		}
+	}
+
 	if (drv_data && drv_data->setup_clock) {
 		ret = drv_data->setup_clock(host);
 		if (ret) {
-- 
1.7.9.5


  parent reply	other threads:[~2013-08-28 12:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-28 12:08 [RFC V3 0/4] dw_mmc platform specific private data and SMU init Yuvaraj Kumar C D
2013-08-28 12:08 ` [RFC V3 1/4] mmc: dw_mmc: exynos: move the exynos private init Yuvaraj Kumar C D
2013-08-28 12:08 ` [RFC V3 2/4] mmc: dw_mmc: socfpga: move socfpga " Yuvaraj Kumar C D
2013-08-29 11:59   ` Seungwon Jeon
2013-09-04 19:31     ` Dinh Nguyen
2013-09-05  5:41       ` Yuvaraj Kumar
2013-08-28 12:08 ` Yuvaraj Kumar C D [this message]
2013-08-28 12:08 ` [RFC V3 4/4] mmc: dw_mmc: exynos: configure SMU in exynos5420 Yuvaraj Kumar C D
2013-08-29  8:23   ` Seungwon Jeon
2013-08-29  9:08     ` Alim Akhtar
2013-08-29  9:44       ` Seungwon Jeon
2013-08-29 10:04         ` Yuvaraj Kumar
2013-08-29 10:10           ` Yuvaraj Kumar
2013-08-29 10:36           ` Seungwon Jeon
2013-08-29 11:46             ` Tomasz Figa
2013-08-30  3:44               ` Seungwon Jeon
2013-08-29  9:42     ` Yuvaraj Kumar
2013-08-29  3:05 ` [RFC V3 0/4] dw_mmc platform specific private data and SMU init Jaehoon Chung
2013-08-29  7:12   ` Seungwon Jeon

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=1377691731-7226-4-git-send-email-yuvaraj.cd@samsung.com \
    --to=yuvaraj.cd@gmail.com \
    --cc=alim.akhtar@samsung.com \
    --cc=cjb@laptop.org \
    --cc=jh80.chung@samsung.com \
    --cc=ks.giri@samsung.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=t.figa@samsung.com \
    --cc=tgih.jun@samsung.com \
    --cc=yuvaraj.cd@samsung.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.