public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Liu <kliu5@marvell.com>
To: linux-mmc@vger.kernel.org, Chris Ball <cjb@laptop.org>,
	Jerry Huang <Chang-Ming.Huang@freescale.com>,
	Chunhe Lan <Chunhe.Lan@freescale.com>,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>,
	Sujit Reddy Thumma <sthumma@codeaurora.org>,
	Jaehoon Chung <jh80.chung@samsung.com>,
	Aaron Lu <aaron.lu@intel.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Wei WANG <wei_wang@realsil.com.cn>,
	Fabio Estevam <fabio.estevam@freescale.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Philip Rakity <prakity@nvidia.com>,
	Shawn Guo <shawn.guo@linaro.org>,
	Johan Rudholm <johan.rudholm@stericsson.com>,
	Girish K S <girish.shivananjappa@linaro.org>,
	Haijun Zhang <Haijun.Zhang@freescale.com>,
	Zhangfei Gao <zhangfei.gao@gmail.com>,
	Haojian Zhuang <haojian.zhuang@gmail.com>,
	Chao Xie <cxie4@marvell.com>, Kevin Liu <keyuan.liu@gmail.com>,
	Kevin Liu <kliu5@marvell.com>
Subject: [PATCH RESEND 1/4] mmc: sdhci-pxav3: transfer sdhci_pltfm_data as arguments to sdhci_pltfm_init
Date: Mon, 25 Mar 2013 17:42:56 +0800	[thread overview]
Message-ID: <1364204579-13307-2-git-send-email-kliu5@marvell.com> (raw)
In-Reply-To: <1364204579-13307-1-git-send-email-kliu5@marvell.com>

sdhci_pltfm_init can set host->ops and host->quirks if sdhci_pltfm_data
is transfered as arguments. Then no need to set them manually in
sdhci_pxav3_probe.

Signed-off-by: Kevin Liu <kliu5@marvell.com>
---
 drivers/mmc/host/sdhci-pxav3.c |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c
index 5663a6e..14437fc 100644
--- a/drivers/mmc/host/sdhci-pxav3.c
+++ b/drivers/mmc/host/sdhci-pxav3.c
@@ -174,6 +174,14 @@ static const struct sdhci_ops pxav3_sdhci_ops = {
 	.get_max_clock = sdhci_pltfm_clk_get_max_clock,
 };
 
+static struct sdhci_pltfm_data sdhci_pxav3_pdata = {
+	.quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL
+		| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC
+		| SDHCI_QUIRK_32BIT_ADMA_SIZE
+		| SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN,
+	.ops = &pxav3_sdhci_ops,
+};
+
 #ifdef CONFIG_OF
 static const struct of_device_id sdhci_pxav3_of_match[] = {
 	{
@@ -235,7 +243,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
 	if (!pxa)
 		return -ENOMEM;
 
-	host = sdhci_pltfm_init(pdev, NULL);
+	host = sdhci_pltfm_init(pdev, &sdhci_pxav3_pdata);
 	if (IS_ERR(host)) {
 		kfree(pxa);
 		return PTR_ERR(host);
@@ -252,11 +260,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
 	pltfm_host->clk = clk;
 	clk_prepare_enable(clk);
 
-	host->quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL
-		| SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC
-		| SDHCI_QUIRK_32BIT_ADMA_SIZE
-		| SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN;
-
 	/* enable 1/8V DDR capable */
 	host->mmc->caps |= MMC_CAP_1_8V_DDR;
 
@@ -296,8 +299,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
 		}
 	}
 
-	host->ops = &pxav3_sdhci_ops;
-
 	sdhci_get_of_property(pdev);
 
 	pm_runtime_set_active(&pdev->dev);
-- 
1.7.9.5


  reply	other threads:[~2013-03-25  9:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-25  9:42 [PATCH 0/4] mmc: sdhci-pxav3: misc enhancements Kevin Liu
2013-03-25  9:42 ` Kevin Liu [this message]
2013-03-25  9:42 ` [PATCH RESEND 2/4] mmc: sdhci-pxav3: remove cd-broken quirk for permanently present card Kevin Liu
2013-03-25  9:42 ` [PATCH RESEND 3/4] mmc: sdhci-pxav3: enhance device tree parser code Kevin Liu
2013-03-25  9:42 ` [PATCH RESEND v5 4/4] mmc: sdhci-pxav3: controller should use SDCLK for timeout caculation Kevin Liu
2013-04-02  7:49 ` [PATCH 0/4] mmc: sdhci-pxav3: misc enhancements Haojian Zhuang
2013-04-04 14:04   ` Chris Ball

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=1364204579-13307-2-git-send-email-kliu5@marvell.com \
    --to=kliu5@marvell.com \
    --cc=Chang-Ming.Huang@freescale.com \
    --cc=Chunhe.Lan@freescale.com \
    --cc=Haijun.Zhang@freescale.com \
    --cc=aaron.lu@intel.com \
    --cc=adrian.hunter@intel.com \
    --cc=cjb@laptop.org \
    --cc=cxie4@marvell.com \
    --cc=fabio.estevam@freescale.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=girish.shivananjappa@linaro.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=jh80.chung@samsung.com \
    --cc=johan.rudholm@stericsson.com \
    --cc=keyuan.liu@gmail.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=prakity@nvidia.com \
    --cc=shawn.guo@linaro.org \
    --cc=sthumma@codeaurora.org \
    --cc=swarren@wwwdotorg.org \
    --cc=ulf.hansson@linaro.org \
    --cc=wei_wang@realsil.com.cn \
    --cc=zhangfei.gao@gmail.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