return err;
 }
 
+static void dwcmshc_disable_card_clk(struct sdhci_host *host)
+{
+       u16 ctrl;
+
+       ctrl = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
+       if (ctrl & SDHCI_CLOCK_CARD_EN) {
+               ctrl &= ~SDHCI_CLOCK_CARD_EN;
+               sdhci_writew(host, ctrl, SDHCI_CLOCK_CONTROL);
+       }
+}
+
 static void dwcmshc_remove(struct platform_device *pdev)
 {
        struct sdhci_host *host = platform_get_drvdata(pdev);
        struct dwcmshc_priv *priv = sdhci_pltfm_priv(pltfm_host);
        struct rk35xx_priv *rk_priv = priv->priv;
 
+       pm_runtime_get_sync(&pdev->dev);
+       pm_runtime_disable(&pdev->dev);
+       pm_runtime_put_noidle(&pdev->dev);
+
        sdhci_remove_host(host, 0);
 
+       dwcmshc_disable_card_clk(host);
+
        clk_disable_unprepare(pltfm_host->clk);
        clk_disable_unprepare(priv->bus_clk);
        if (rk_priv)
        }
 }
 
-static void dwcmshc_disable_card_clk(struct sdhci_host *host)
-{
-       u16 ctrl;
-
-       ctrl = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
-       if (ctrl & SDHCI_CLOCK_CARD_EN) {
-               ctrl &= ~SDHCI_CLOCK_CARD_EN;
-               sdhci_writew(host, ctrl, SDHCI_CLOCK_CONTROL);
-       }
-}
-
 static int dwcmshc_runtime_suspend(struct device *dev)
 {
        struct sdhci_host *host = dev_get_drvdata(dev);