Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196687
b: refs/heads/master
c: f474849
h: refs/heads/master
i:
  196685: 2c1fa7b
  196683: 35414a3
  196679: 50476a0
  196671: 0cd373e
v: v3
  • Loading branch information
San Mehat authored and Daniel Walker committed Mar 18, 2010
1 parent 4437d66 commit 9985d03
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c7fc9370df1433486dfa9460a833fae664e8be6c
refs/heads/master: f4748499d3dc5e7cadecb977f0d4f1f4f4a8d8c5
13 changes: 13 additions & 0 deletions trunk/drivers/mmc/host/msm_sdcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@

#define DRIVER_NAME "msm-sdcc"

#define BUSCLK_PWRSAVE 0
#define BUSCLK_TIMEOUT (HZ)
static unsigned int msmsdcc_fmin = 144000;
static unsigned int msmsdcc_fmax = 50000000;
Expand All @@ -65,6 +66,8 @@ msmsdcc_disable_clocks(struct msmsdcc_host *host, int deferr)
{
WARN_ON(!host->clks_on);

BUG_ON(host->curr.mrq);

if (deferr) {
mod_timer(&host->busclk_timer, jiffies + BUSCLK_TIMEOUT);
} else {
Expand Down Expand Up @@ -131,7 +134,9 @@ msmsdcc_request_end(struct msmsdcc_host *host, struct mmc_request *mrq)
if (mrq->cmd->error == -ETIMEDOUT)
mdelay(5);

#if BUSCLK_PWRSAVE
msmsdcc_disable_clocks(host, 1);
#endif
/*
* Need to drop the host lock here; mmc_request_done may call
* back into the driver...
Expand Down Expand Up @@ -257,7 +262,9 @@ msmsdcc_dma_complete_func(struct msm_dmov_cmd *cmd,
mrq->data->bytes_xfered = host->curr.data_xfered;

spin_unlock_irqrestore(&host->lock, flags);
#if BUSCLK_PWRSAVE
msmsdcc_disable_clocks(host, 1);
#endif
mmc_request_done(host->mmc, mrq);
return;
} else
Expand Down Expand Up @@ -934,7 +941,9 @@ msmsdcc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
host->pwr = pwr;
msmsdcc_writel(host, pwr, MMCIPOWER);
}
#if BUSCLK_PWRSAVE
msmsdcc_disable_clocks(host, 1);
#endif
spin_unlock_irqrestore(&host->lock, flags);
}

Expand Down Expand Up @@ -1279,7 +1288,9 @@ msmsdcc_probe(struct platform_device *pdev)
if (host->timer.function)
pr_info("%s: Polling status mode enabled\n", mmc_hostname(mmc));

#if BUSCLK_PWRSAVE
msmsdcc_disable_clocks(host, 1);
#endif
return 0;
cmd_irq_free:
free_irq(cmd_irqres->start, host);
Expand Down Expand Up @@ -1341,7 +1352,9 @@ msmsdcc_resume(struct platform_device *dev)
mmc_resume_host(mmc);
if (host->stat_irq)
enable_irq(host->stat_irq);
#if BUSCLK_PWRSAVE
msmsdcc_disable_clocks(host, 1);
#endif
}
return 0;
}
Expand Down

0 comments on commit 9985d03

Please sign in to comment.