]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/mmc/host/sdhci-s3c.c
sdhci-s3c: add missing remove function
[net-next-2.6.git] / drivers / mmc / host / sdhci-s3c.c
index 2136794c0cfaf66fed55c5433f8e4bc574e19604..ad30f074ee151eead0ebe435037fde70055f1d20 100644 (file)
@@ -317,12 +317,7 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
        host->irq = irq;
 
        /* Setup quirks for the controller */
-
-       /* Currently with ADMA enabled we are getting some length
-        * interrupts that are not being dealt with, do disable
-        * ADMA until this is sorted out. */
-       host->quirks |= SDHCI_QUIRK_BROKEN_ADMA;
-       host->quirks |= SDHCI_QUIRK_32BIT_ADMA_SIZE;
+       host->quirks |= SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC;
 
 #ifndef CONFIG_MMC_SDHCI_S3C_DMA
 
@@ -330,9 +325,6 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
         * support as well. */
        host->quirks |= SDHCI_QUIRK_BROKEN_DMA;
 
-       /* PIO currently has problems with multi-block IO */
-       host->quirks |= SDHCI_QUIRK_NO_MULTIBLOCK;
-
 #endif /* CONFIG_MMC_SDHCI_S3C_DMA */
 
        /* It seems we do not get an DATA transfer complete on non-busy
@@ -373,6 +365,26 @@ static int __devinit sdhci_s3c_probe(struct platform_device *pdev)
 
 static int __devexit sdhci_s3c_remove(struct platform_device *pdev)
 {
+       struct sdhci_host *host =  platform_get_drvdata(pdev);
+       struct sdhci_s3c *sc = sdhci_priv(host);
+       int ptr;
+
+       sdhci_remove_host(host, 1);
+
+       for (ptr = 0; ptr < 3; ptr++) {
+               clk_disable(sc->clk_bus[ptr]);
+               clk_put(sc->clk_bus[ptr]);
+       }
+       clk_disable(sc->clk_io);
+       clk_put(sc->clk_io);
+
+       iounmap(host->ioaddr);
+       release_resource(sc->ioarea);
+       kfree(sc->ioarea);
+
+       sdhci_free_host(host);
+       platform_set_drvdata(pdev, NULL);
+
        return 0;
 }