From: Kevin Liu Subject: [PATCH 2/3] mmc: sdhci-pxav3: transfer platform data to sdhci_pltfm_init Date: Fri, 1 Mar 2013 17:41:28 +0800 Message-ID: <1362130888-675-1-git-send-email-kliu5@marvell.com> Return-path: Received: from na3sys009aog108.obsmtp.com ([74.125.149.199]:59233 "EHLO na3sys009aog108.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751246Ab3CAJkz (ORCPT ); Fri, 1 Mar 2013 04:40:55 -0500 Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: linux-mmc@vger.kernel.org, Chris Ball , Guennadi Liakhovetski , Sujit Reddy Thumma , Jaehoon Chung , Aaron Lu , Ulf Hansson , Wei WANG , Fabio Estevam Cc: Stephen Warren , Adrian Hunter , Philip Rakity , Shawn Guo , Johan Rudholm , Girish K S , Haijun Zhang , Zhangfei Gao , Haojian Zhuang , Chao Xie , Kevin Liu , Kevin Liu Let sdhci_pltfm_init set host->ops and host->quirks. Signed-off-by: Kevin Liu --- 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 a0cdbc5..55d0784 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c @@ -174,6 +174,14 @@ static 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