Commit 73b7afb9 authored by Kevin Liu's avatar Kevin Liu Committed by Chris Ball

mmc: sdhci-pxav3: transfer sdhci_pltfm_data as args to sdhci_pltfm_init

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: default avatarKevin Liu <kliu5@marvell.com>
Acked-by: default avatarHaojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent c09fbd74
...@@ -174,6 +174,14 @@ static const struct sdhci_ops pxav3_sdhci_ops = { ...@@ -174,6 +174,14 @@ static const struct sdhci_ops pxav3_sdhci_ops = {
.get_max_clock = sdhci_pltfm_clk_get_max_clock, .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 #ifdef CONFIG_OF
static const struct of_device_id sdhci_pxav3_of_match[] = { static const struct of_device_id sdhci_pxav3_of_match[] = {
{ {
...@@ -235,7 +243,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) ...@@ -235,7 +243,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
if (!pxa) if (!pxa)
return -ENOMEM; return -ENOMEM;
host = sdhci_pltfm_init(pdev, NULL); host = sdhci_pltfm_init(pdev, &sdhci_pxav3_pdata);
if (IS_ERR(host)) { if (IS_ERR(host)) {
kfree(pxa); kfree(pxa);
return PTR_ERR(host); return PTR_ERR(host);
...@@ -252,11 +260,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) ...@@ -252,11 +260,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
pltfm_host->clk = clk; pltfm_host->clk = clk;
clk_prepare_enable(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 */ /* enable 1/8V DDR capable */
host->mmc->caps |= MMC_CAP_1_8V_DDR; host->mmc->caps |= MMC_CAP_1_8V_DDR;
...@@ -296,8 +299,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) ...@@ -296,8 +299,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
} }
} }
host->ops = &pxav3_sdhci_ops;
sdhci_get_of_property(pdev); sdhci_get_of_property(pdev);
pm_runtime_set_active(&pdev->dev); pm_runtime_set_active(&pdev->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment