diff options
author | Deepesh Gujarathi <dgujarathi@nvidia.com> | 2010-02-03 17:36:59 +0530 |
---|---|---|
committer | Deepesh Gujarathi <dgujarathi@nvidia.com> | 2010-02-10 16:06:45 +0530 |
commit | 892f6497b3de28f513f1d0a0e240cadba8f763c1 (patch) | |
tree | 7882ceca12ce43f78297fb28fe810d0e5199bc5f /drivers | |
parent | 14d292446f6e6813a4e218ed14af1109454f7757 (diff) |
Revert "tegra: Dynamically control the card clock for SD memory devices"
This reverts commit 179fa807239b85a471b046a5ba75dce7c0f68dec.
Need to add dynamic clocking the right way, i.e. as part enable/disable
mmc_ops handler. Commit to follow soon.
Change-Id: I74245b0c7ba9da5c839b08fbe7dce293080a06a4
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/host/Kconfig | 12 | ||||
-rw-r--r-- | drivers/mmc/host/sdhci.c | 26 | ||||
-rw-r--r--[-rwxr-xr-x] | drivers/mmc/host/sdhci.h | 5 |
3 files changed, 3 insertions, 40 deletions
diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index aca32075e12d..3f8a5bb69e42 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -37,18 +37,6 @@ config MMC_SDHCI If unsure, say N. -config MMC_SDHCI_DYNAMIC_SDMEM_CLOCK - depends on MMC_SDHCI - bool "Dynamically control the card clock for SD memory devices" - default y - help - On certain embedded devices, leaving the card clock enabled to - SD memory devices with no active transactions can increase power - consumption. Enable this option to automatically disable the card - clock after transfers complete. - - If unsure, say N here. - config MMC_SDHCI_PCI tristate "SDHCI support on PCI bus" depends on MMC_SDHCI && PCI diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index bb5485aa4c08..4e1d6cc337ea 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -18,7 +18,6 @@ #include <linux/io.h> #include <linux/dma-mapping.h> #include <linux/scatterlist.h> -#include <linux/mmc/card.h> #include <linux/leds.h> @@ -135,9 +134,6 @@ static void sdhci_init(struct sdhci_host *host) writel(intmask, host->ioaddr + SDHCI_INT_ENABLE); writel(intmask, host->ioaddr + SDHCI_SIGNAL_ENABLE); -#ifdef CONFIG_MMC_SDHCI_DYNAMIC_SDMEM_CLOCK - host->last_clock = 0; -#endif } static void sdhci_activate_led(struct sdhci_host *host) @@ -933,9 +929,7 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) if (clock == 0) goto out; -#ifdef CONFIG_MMC_SDHCI_DYNAMIC_SDMEM_CLOCK - host->last_clock = clock; -#endif + div = 0; if (host->ops->set_clock) div = host->ops->set_clock(host, clock); @@ -1036,15 +1030,6 @@ static void sdhci_request(struct mmc_host *mmc, struct mmc_request *mrq) unsigned long flags; host = mmc_priv(mmc); -#ifdef CONFIG_MMC_SDHCI_DYNAMIC_SDMEM_CLOCK - if (host->mmc->card != NULL) { - if (host->mmc->card->type != MMC_TYPE_SDIO) { - if (host->last_clock) - /* Enable clock */ - sdhci_set_clock(host, host->last_clock); - } - } -#endif spin_lock_irqsave(&host->lock, flags); @@ -1275,14 +1260,7 @@ static void sdhci_tasklet_finish(unsigned long param) mmiowb(); spin_unlock_irqrestore(&host->lock, flags); -#ifdef CONFIG_MMC_SDHCI_DYNAMIC_SDMEM_CLOCK - /* Disable clock */ - if (host->mmc->card != NULL) { - if (host->mmc->card->type != MMC_TYPE_SDIO) { - sdhci_set_clock(host, 0); - } - } -#endif + mmc_request_done(host->mmc, mrq); } diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index fc746a0efeed..9e6359954efc 100755..100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -58,7 +58,7 @@ #define SDHCI_CARD_PRESENT 0x00010000 #define SDHCI_WRITE_PROTECT 0x00080000 -#define SDHCI_HOST_CONTROL 0x28 +#define SDHCI_HOST_CONTROL 0x28 #define SDHCI_CTRL_LED 0x01 #define SDHCI_CTRL_4BITBUS 0x02 #define SDHCI_CTRL_8BITBUS 0x20 @@ -250,9 +250,6 @@ struct sdhci_host { unsigned int timeout_clk; /* Timeout freq (KHz) */ unsigned int clock; /* Current clock (MHz) */ -#ifdef CONFIG_MMC_SDHCI_DYNAMIC_SDMEM_CLOCK - unsigned int last_clock; /* Last used clock (MHz) */ -#endif unsigned short power; /* Current voltage */ struct mmc_request *mrq; /* Current request */ |