diff options
Diffstat (limited to 'drivers/mmc/host/sdhci-spear.c')
-rw-r--r-- | drivers/mmc/host/sdhci-spear.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c index 6be89c032de..c6ece0bd03b 100644 --- a/drivers/mmc/host/sdhci-spear.c +++ b/drivers/mmc/host/sdhci-spear.c @@ -71,8 +71,7 @@ static irqreturn_t sdhci_gpio_irq(int irq, void *dev_id) } #ifdef CONFIG_OF -static struct sdhci_plat_data * __devinit -sdhci_probe_config_dt(struct platform_device *pdev) +static struct sdhci_plat_data *sdhci_probe_config_dt(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct sdhci_plat_data *pdata = NULL; @@ -96,14 +95,13 @@ sdhci_probe_config_dt(struct platform_device *pdev) return pdata; } #else -static struct sdhci_plat_data * __devinit -sdhci_probe_config_dt(struct platform_device *pdev) +static struct sdhci_plat_data *sdhci_probe_config_dt(struct platform_device *pdev) { return ERR_PTR(-ENOSYS); } #endif -static int __devinit sdhci_probe(struct platform_device *pdev) +static int sdhci_probe(struct platform_device *pdev) { struct device_node *np = pdev->dev.of_node; struct sdhci_host *host; @@ -146,6 +144,11 @@ static int __devinit sdhci_probe(struct platform_device *pdev) goto put_clk; } + ret = clk_set_rate(sdhci->clk, 50000000); + if (ret) + dev_dbg(&pdev->dev, "Error setting desired clk, clk=%lu\n", + clk_get_rate(sdhci->clk)); + if (np) { sdhci->data = sdhci_probe_config_dt(pdev); if (IS_ERR(sdhci->data)) { @@ -268,7 +271,7 @@ err: return ret; } -static int __devexit sdhci_remove(struct platform_device *pdev) +static int sdhci_remove(struct platform_device *pdev) { struct sdhci_host *host = platform_get_drvdata(pdev); struct spear_sdhci *sdhci = dev_get_platdata(&pdev->dev); @@ -297,7 +300,7 @@ static int sdhci_suspend(struct device *dev) ret = sdhci_suspend_host(host); if (!ret) - clk_disable_unprepare(sdhci->clk); + clk_disable(sdhci->clk); return ret; } @@ -308,7 +311,7 @@ static int sdhci_resume(struct device *dev) struct spear_sdhci *sdhci = dev_get_platdata(dev); int ret; - ret = clk_prepare_enable(sdhci->clk); + ret = clk_enable(sdhci->clk); if (ret) { dev_dbg(dev, "Resume: Error enabling clock\n"); return ret; @@ -336,7 +339,7 @@ static struct platform_driver sdhci_driver = { .of_match_table = of_match_ptr(sdhci_spear_id_table), }, .probe = sdhci_probe, - .remove = __devexit_p(sdhci_remove), + .remove = sdhci_remove, }; module_platform_driver(sdhci_driver); |