diff options
author | Ulf Hansson <ulf.hansson@stericsson.com> | 2011-05-19 15:12:12 +0200 |
---|---|---|
committer | said m bagheri <ebgheri@steludxu2848.(none)> | 2011-06-17 13:41:52 +0200 |
commit | 1fe220e87baa0dbd55f178ecd03022017820eafa (patch) | |
tree | 8edb2dd0f7c8a5e8466cbaa159bfaa2fa9d8b217 /drivers/mmc | |
parent | 2e1fde43e048abf6a24299ab13ac5fd726c43afb (diff) |
mmci: Fixed calculation of f_min
For the st_clkdiv variant f_min is now calculated correctly.
Change-Id: Ibc7a2ba149b6e15bcd4091b77b131437d8cd268b
Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/23452
Reviewed-by: Sebastian RASMUSSEN <sebastian.rasmussen@stericsson.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/mmci.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 129c1205ab3..ef81ab052c0 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -1330,7 +1330,10 @@ static int __devinit mmci_probe(struct amba_device *dev, } mmc->ops = &mmci_ops; - mmc->f_min = (host->mclk + 511) / 512; + if (variant->st_clkdiv) + mmc->f_min = host->mclk / 257; + else + mmc->f_min = (host->mclk + 511) / 512; /* * If the platform data supplies a maximum operating * frequency, this takes precedence. Else, we fall back |