From f0818042151047caf2874678f0039d5c3072d9ae Mon Sep 17 00:00:00 2001 From: Robby Cai Date: Fri, 22 Oct 2010 13:56:50 +0800 Subject: ENGR00132885-1 Reverted the commit 8281bd8 (ENGR00132615-1) Previous patch is not stable enough, reverted. Signed-off-by: Aisheng.Dong --- drivers/mmc/host/mx_sdhci.c | 25 ------------------------- drivers/mmc/host/mx_sdhci.h | 3 --- 2 files changed, 28 deletions(-) diff --git a/drivers/mmc/host/mx_sdhci.c b/drivers/mmc/host/mx_sdhci.c index e8782a3dac6d..c522aa9c2d99 100644 --- a/drivers/mmc/host/mx_sdhci.c +++ b/drivers/mmc/host/mx_sdhci.c @@ -109,18 +109,11 @@ static unsigned int *adma_des_table; #define MXC_SDHCI_NUM 4 #endif -/* - * Define ahb clock and esdhc clock in low power mode - */ -#define LP_AHB_CLOCK 24000000 -#define LP_ESDHC_CLOCK 20000000 - static struct sdhci_chip *mxc_fix_chips[MXC_SDHCI_NUM]; static void sdhci_prepare_data(struct sdhci_host *, struct mmc_data *); static void sdhci_finish_data(struct sdhci_host *); -static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock); static void sdhci_send_command(struct sdhci_host *, struct mmc_command *); static void sdhci_finish_command(struct sdhci_host *); @@ -666,28 +659,12 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd) u32 mask; u32 mode = 0; unsigned long timeout; - struct clk *ahb_clk; DBG("sdhci_send_command 0x%x is starting...\n", cmd->opcode); WARN_ON(host->cmd); /* Wait max 10 ms */ timeout = 500; - if (cpu_is_mx50()) { - ahb_clk = clk_get(NULL, "ahb_clk"); - - if (clk_get_rate(ahb_clk) == LP_AHB_CLOCK) { - host->lp_mode = 1; - - if (host->req_clock != LP_ESDHC_CLOCK) - sdhci_set_clock(host, LP_ESDHC_CLOCK); - } else { - if (host->lp_mode) - sdhci_set_clock(host, host->max_clk); - - host->lp_mode = 0; - } - } mask = SDHCI_CMD_INHIBIT; if ((cmd->data != NULL) || (cmd->flags & MMC_RSP_BUSY)) @@ -905,8 +882,6 @@ static void sdhci_set_clock(struct sdhci_host *host, unsigned int clock) host->clock = (clk_rate / (div + 1)) / (prescaler * 2); else host->clock = clk_rate / (div + 1); - - host->req_clock = clock; } static void sdhci_set_power(struct sdhci_host *host, unsigned short power) diff --git a/drivers/mmc/host/mx_sdhci.h b/drivers/mmc/host/mx_sdhci.h index d9b996332156..39fc0e5ed35d 100644 --- a/drivers/mmc/host/mx_sdhci.h +++ b/drivers/mmc/host/mx_sdhci.h @@ -244,13 +244,10 @@ struct sdhci_host { #define SDHCI_WP_ENABLED (1<<9) /* Write protect */ #define SDHCI_CD_TIMEOUT (1<<10) /* cd timer is expired */ - unsigned int lp_mode; /* Low power mode */ - unsigned int max_clk; /* Max possible freq (MHz) */ unsigned int min_clk; /* Min possible freq (MHz) */ unsigned int timeout_clk; /* Timeout freq (KHz) */ - unsigned int req_clock; /* Current request clock (MHz) */ unsigned int clock; /* Current clock (MHz) */ unsigned short power; /* Current voltage */ struct regulator *regulator_mmc; /*! Regulator */ -- cgit v1.2.3