]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mmc: core: Enable MMC_CAP2_CACHE_CTRL as default
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 18 Dec 2013 10:59:17 +0000 (11:59 +0100)
committerChris Ball <chris@printf.net>
Fri, 14 Feb 2014 03:58:49 +0000 (22:58 -0500)
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>
drivers/mmc/core/core.c
drivers/mmc/core/mmc.c
include/linux/mmc/host.h

index 8928f9f4cfe181b052c1784ed35fd49e22336031..f5a068d55c369a3c656be047ea057a760b028989 100644 (file)
@@ -2562,12 +2562,8 @@ EXPORT_SYMBOL(mmc_power_restore_host);
  */
 int mmc_flush_cache(struct mmc_card *card)
 {
-       struct mmc_host *host = card->host;
        int err = 0;
 
-       if (!(host->caps2 & MMC_CAP2_CACHE_CTRL))
-               return err;
-
        if (mmc_card_mmc(card) &&
                        (card->ext_csd.cache_size > 0) &&
                        (card->ext_csd.cache_ctrl & 1)) {
index 6d446e217f3654a10c7cdb649c60712630eea1f7..072171183d5b781b9d2d0e70b445954dd8bedd74 100644 (file)
@@ -1287,8 +1287,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
         * If cache size is higher than 0, this indicates
         * the existence of cache and it can be turned on.
         */
-       if ((host->caps2 & MMC_CAP2_CACHE_CTRL) &&
-                       card->ext_csd.cache_size > 0) {
+       if (card->ext_csd.cache_size > 0) {
                err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
                                EXT_CSD_CACHE_CTRL, 1,
                                card->ext_csd.generic_cmd6_time);
index f69bd70b1046a1fedc6d7e34b57d1c674b1df428..719db89ef13420b2034c08fe71305b8f85d8eb17 100644 (file)
@@ -264,7 +264,6 @@ struct mmc_host {
        u32                     caps2;          /* More host capabilities */
 
 #define MMC_CAP2_BOOTPART_NOACC        (1 << 0)        /* Boot partition no access */
-#define MMC_CAP2_CACHE_CTRL    (1 << 1)        /* Allow cache control */
 #define MMC_CAP2_FULL_PWR_CYCLE        (1 << 2)        /* Can do full power cycle */
 #define MMC_CAP2_NO_MULTI_READ (1 << 3)        /* Multiblock reads don't work */
 #define MMC_CAP2_HS200_1_8V_SDR        (1 << 5)        /* can support */