diff options
author | Al Cooper <alcooperx@gmail.com> | 2012-11-30 10:53:35 -0500 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2013-09-16 12:28:12 -0700 |
commit | cf52b7b238c044b41b3b21ebcf8992160eae5ce6 (patch) | |
tree | 65e55b81e6e91332f41a1feffcf5a0518e6d2630 /drivers | |
parent | c9972a13e1c1877bcfc486a2c6e63613d61f6963 (diff) |
mmc: Limit MMC speed to 52MHz if not HS200
If "caps2" host capabilities does not indicate support for MMC
HS200, don't allow clock speeds >52MHz. Currently, for MMC, the
clock speed is set to the lesser of the max speed the eMMC module
supports (card->ext_csd.hs_max_dtr) or the max base clock of the
host controller (host->f_max based on BASE_CLK_FREQ in the host
CAPS register). This means that a host controller that doesn't
support HS200 mode but has a base clock of 100MHz and an eMMC module
that supports HS200 speeds will end up using a 100MHz clock.
Signed-off-by: Al Cooper <alcooperx@gmail.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
(cherry picked from commit ccb52a00fd3fdea428e29816cbacb0a78090d474)
Reviewed-on: http://git-master/r/227758
(cherry picked from commit ed5cc4ef1e8bcdae292b6f234dbb7054cf5542cb)
Change-Id: I2967fcc733b7178bdf54d6f75f65bdff253fc1cc
Signed-off-by: Pavan Kunapuli <pkunapuli@nvidia.com>
Signed-off-by: Naveen Kumar Arepalli <naveenk@nvidia.com>
Change-Id: Iac4fda7a964c2a7791d62046376800de4f7a26bd
Reviewed-on: http://git-master/r/274992
GVS: Gerrit_Virtual_Submit
Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/core/mmc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 88b45bbbc17e..fb2fbb66a761 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1119,6 +1119,8 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, if (mmc_card_highspeed(card) || mmc_card_hs200(card)) { if (max_dtr > card->ext_csd.hs_max_dtr) max_dtr = card->ext_csd.hs_max_dtr; + if (mmc_card_highspeed(card) && (max_dtr > 52000000)) + max_dtr = 52000000; } else if (max_dtr > card->csd.max_dtr) { max_dtr = card->csd.max_dtr; } |