diff options
| author | Kevin Liu <kliu5@marvell.com> | 2013-03-25 05:42:56 -0400 |
|---|---|---|
| committer | Chris Ball <cjb@laptop.org> | 2013-04-04 09:58:11 -0400 |
| commit | 73b7afb9764b77fca99d515b8d9cbeeaae5fe55c (patch) | |
| tree | 1fb7fc4bca02f0d34b2d09654398b4e4cbd583fb /drivers/mmc | |
| parent | c09fbd7451b797213b3df8bf077776b9ec33f954 (diff) | |
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: Kevin Liu <kliu5@marvell.com>
Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
| -rw-r--r-- | drivers/mmc/host/sdhci-pxav3.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index 5663a6e754e5..14437fc17d83 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 = { | |||
| 174 | .get_max_clock = sdhci_pltfm_clk_get_max_clock, | 174 | .get_max_clock = sdhci_pltfm_clk_get_max_clock, |
| 175 | }; | 175 | }; |
| 176 | 176 | ||
| 177 | static struct sdhci_pltfm_data sdhci_pxav3_pdata = { | ||
| 178 | .quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | ||
| 179 | | SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC | ||
| 180 | | SDHCI_QUIRK_32BIT_ADMA_SIZE | ||
| 181 | | SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN, | ||
| 182 | .ops = &pxav3_sdhci_ops, | ||
| 183 | }; | ||
| 184 | |||
| 177 | #ifdef CONFIG_OF | 185 | #ifdef CONFIG_OF |
| 178 | static const struct of_device_id sdhci_pxav3_of_match[] = { | 186 | static const struct of_device_id sdhci_pxav3_of_match[] = { |
| 179 | { | 187 | { |
| @@ -235,7 +243,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) | |||
| 235 | if (!pxa) | 243 | if (!pxa) |
| 236 | return -ENOMEM; | 244 | return -ENOMEM; |
| 237 | 245 | ||
| 238 | host = sdhci_pltfm_init(pdev, NULL); | 246 | host = sdhci_pltfm_init(pdev, &sdhci_pxav3_pdata); |
| 239 | if (IS_ERR(host)) { | 247 | if (IS_ERR(host)) { |
| 240 | kfree(pxa); | 248 | kfree(pxa); |
| 241 | return PTR_ERR(host); | 249 | return PTR_ERR(host); |
| @@ -252,11 +260,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) | |||
| 252 | pltfm_host->clk = clk; | 260 | pltfm_host->clk = clk; |
| 253 | clk_prepare_enable(clk); | 261 | clk_prepare_enable(clk); |
| 254 | 262 | ||
| 255 | host->quirks = SDHCI_QUIRK_BROKEN_TIMEOUT_VAL | ||
| 256 | | SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC | ||
| 257 | | SDHCI_QUIRK_32BIT_ADMA_SIZE | ||
| 258 | | SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN; | ||
| 259 | |||
| 260 | /* enable 1/8V DDR capable */ | 263 | /* enable 1/8V DDR capable */ |
| 261 | host->mmc->caps |= MMC_CAP_1_8V_DDR; | 264 | host->mmc->caps |= MMC_CAP_1_8V_DDR; |
| 262 | 265 | ||
| @@ -296,8 +299,6 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) | |||
| 296 | } | 299 | } |
| 297 | } | 300 | } |
| 298 | 301 | ||
| 299 | host->ops = &pxav3_sdhci_ops; | ||
| 300 | |||
| 301 | sdhci_get_of_property(pdev); | 302 | sdhci_get_of_property(pdev); |
| 302 | 303 | ||
| 303 | pm_runtime_set_active(&pdev->dev); | 304 | pm_runtime_set_active(&pdev->dev); |
