diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2013-12-18 05:59:17 -0500 |
---|---|---|
committer | Chris Ball <chris@printf.net> | 2014-02-13 22:58:49 -0500 |
commit | 7536d3f83aa42ba1a3b1c6b30c2b6d94a820cbb2 (patch) | |
tree | 7d7e0d1e730528f2ca7fd8e987d305274e019a46 /drivers/mmc | |
parent | 10e5d9652499a8bc0a99ffc2a96a3030fee576cb (diff) |
mmc: core: Enable MMC_CAP2_CACHE_CTRL as default
There are no reason to why the use of a non-volatile internal eMMC
cache should be controlled by a host cap. Instead let's just enable it
if the eMMC card supports it.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/core.c | 4 | ||||
-rw-r--r-- | drivers/mmc/core/mmc.c | 3 |
2 files changed, 1 insertions, 6 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 8928f9f4cfe1..f5a068d55c36 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -2562,12 +2562,8 @@ EXPORT_SYMBOL(mmc_power_restore_host); | |||
2562 | */ | 2562 | */ |
2563 | int mmc_flush_cache(struct mmc_card *card) | 2563 | int mmc_flush_cache(struct mmc_card *card) |
2564 | { | 2564 | { |
2565 | struct mmc_host *host = card->host; | ||
2566 | int err = 0; | 2565 | int err = 0; |
2567 | 2566 | ||
2568 | if (!(host->caps2 & MMC_CAP2_CACHE_CTRL)) | ||
2569 | return err; | ||
2570 | |||
2571 | if (mmc_card_mmc(card) && | 2567 | if (mmc_card_mmc(card) && |
2572 | (card->ext_csd.cache_size > 0) && | 2568 | (card->ext_csd.cache_size > 0) && |
2573 | (card->ext_csd.cache_ctrl & 1)) { | 2569 | (card->ext_csd.cache_ctrl & 1)) { |
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 6d446e217f36..072171183d5b 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
@@ -1287,8 +1287,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr, | |||
1287 | * If cache size is higher than 0, this indicates | 1287 | * If cache size is higher than 0, this indicates |
1288 | * the existence of cache and it can be turned on. | 1288 | * the existence of cache and it can be turned on. |
1289 | */ | 1289 | */ |
1290 | if ((host->caps2 & MMC_CAP2_CACHE_CTRL) && | 1290 | if (card->ext_csd.cache_size > 0) { |
1291 | card->ext_csd.cache_size > 0) { | ||
1292 | err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, | 1291 | err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, |
1293 | EXT_CSD_CACHE_CTRL, 1, | 1292 | EXT_CSD_CACHE_CTRL, 1, |
1294 | card->ext_csd.generic_cmd6_time); | 1293 | card->ext_csd.generic_cmd6_time); |