aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci-s3c.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/sdhci-s3c.c')
-rw-r--r--drivers/mmc/host/sdhci-s3c.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-s3c.c b/drivers/mmc/host/sdhci-s3c.c
index c45b8932d843..c6d2dd7317c1 100644
--- a/drivers/mmc/host/sdhci-s3c.c
+++ b/drivers/mmc/host/sdhci-s3c.c
@@ -12,6 +12,7 @@
12 * published by the Free Software Foundation. 12 * published by the Free Software Foundation.
13 */ 13 */
14 14
15#include <linux/spinlock.h>
15#include <linux/delay.h> 16#include <linux/delay.h>
16#include <linux/dma-mapping.h> 17#include <linux/dma-mapping.h>
17#include <linux/platform_device.h> 18#include <linux/platform_device.h>
@@ -312,7 +313,14 @@ static void sdhci_cmu_set_clock(struct sdhci_host *host, unsigned int clock)
312 313
313 sdhci_s3c_set_clock(host, clock); 314 sdhci_s3c_set_clock(host, clock);
314 315
316 /* Reset SD Clock Enable */
317 clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
318 clk &= ~SDHCI_CLOCK_CARD_EN;
319 sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
320
321 spin_unlock_irq(&host->lock);
315 ret = clk_set_rate(ourhost->clk_bus[ourhost->cur_clk], clock); 322 ret = clk_set_rate(ourhost->clk_bus[ourhost->cur_clk], clock);
323 spin_lock_irq(&host->lock);
316 if (ret != 0) { 324 if (ret != 0) {
317 dev_err(dev, "%s: failed to set clock rate %uHz\n", 325 dev_err(dev, "%s: failed to set clock rate %uHz\n",
318 mmc_hostname(host->mmc), clock); 326 mmc_hostname(host->mmc), clock);
@@ -607,7 +615,9 @@ static int sdhci_s3c_probe(struct platform_device *pdev)
607 pm_runtime_use_autosuspend(&pdev->dev); 615 pm_runtime_use_autosuspend(&pdev->dev);
608 pm_suspend_ignore_children(&pdev->dev, 1); 616 pm_suspend_ignore_children(&pdev->dev, 1);
609 617
610 mmc_of_parse(host->mmc); 618 ret = mmc_of_parse(host->mmc);
619 if (ret)
620 goto err_req_regs;
611 621
612 ret = sdhci_add_host(host); 622 ret = sdhci_add_host(host);
613 if (ret) { 623 if (ret) {