Commit 97bb1969 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Russell King

[ARM PATCH] 2289/2: turn off PXA clock to MMC block when not in use

Patch from Nicolas Pitre

... also remove an unused variable warning.

Signed-off-by: Nicolas Pitre
Signed-off-by: Russell King
parent c5c0f921
...@@ -122,7 +122,7 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data) ...@@ -122,7 +122,7 @@ static void pxamci_setup_data(struct pxamci_host *host, struct mmc_data *data)
unsigned int nob = data->blocks; unsigned int nob = data->blocks;
unsigned int timeout; unsigned int timeout;
u32 dcmd; u32 dcmd;
int i, len; int i;
host->data = data; host->data = data;
...@@ -375,15 +375,14 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) ...@@ -375,15 +375,14 @@ static void pxamci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
if (CLOCKRATE / clk > ios->clock) if (CLOCKRATE / clk > ios->clock)
clk <<= 1; clk <<= 1;
host->clkrt = fls(clk) - 1; host->clkrt = fls(clk) - 1;
pxa_set_cken(CKEN12_MMC, 1);
/* /*
* we write clkrt on the next command * we write clkrt on the next command
*/ */
} else if (readl(host->base + MMC_STAT) & STAT_CLK_EN) { } else {
/* pxamci_stop_clock(host);
* Ensure that the clock is off. pxa_set_cken(CKEN12_MMC, 0);
*/
writel(STOP_CLOCK, host->base + MMC_STRPCL);
} }
if (host->power_mode != ios->power_mode) { if (host->power_mode != ios->power_mode) {
...@@ -505,8 +504,6 @@ static int pxamci_probe(struct device *dev) ...@@ -505,8 +504,6 @@ static int pxamci_probe(struct device *dev)
if (host->pdata && host->pdata->init) if (host->pdata && host->pdata->init)
host->pdata->init(dev, pxamci_detect_irq, mmc); host->pdata->init(dev, pxamci_detect_irq, mmc);
pxa_set_cken(CKEN12_MMC, 1);
mmc_add_host(mmc); mmc_add_host(mmc);
return 0; return 0;
...@@ -545,8 +542,6 @@ static int pxamci_remove(struct device *dev) ...@@ -545,8 +542,6 @@ static int pxamci_remove(struct device *dev)
END_CMD_RES|PRG_DONE|DATA_TRAN_DONE, END_CMD_RES|PRG_DONE|DATA_TRAN_DONE,
host->base + MMC_I_MASK); host->base + MMC_I_MASK);
pxa_set_cken(CKEN12_MMC, 0);
DRCMRRXMMC = 0; DRCMRRXMMC = 0;
DRCMRTXMMC = 0; DRCMRTXMMC = 0;
...@@ -555,8 +550,6 @@ static int pxamci_remove(struct device *dev) ...@@ -555,8 +550,6 @@ static int pxamci_remove(struct device *dev)
iounmap(host->base); iounmap(host->base);
dma_free_coherent(dev, PAGE_SIZE, host->sg_cpu, host->sg_dma); dma_free_coherent(dev, PAGE_SIZE, host->sg_cpu, host->sg_dma);
pxa_set_cken(CKEN12_MMC, 0);
release_resource(host->res); release_resource(host->res);
mmc_free_host(mmc); mmc_free_host(mmc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment