diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2016-07-15 10:54:50 +0900 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2016-07-25 10:34:50 +0200 |
commit | 6024e16654c1e1a2475e848d735963d05a12dba9 (patch) | |
tree | 6b91dcd9309e43fc305d705faf339fdb41ba4eac /drivers/mmc | |
parent | 6ae3e537eab9f560b516b001eb89f0cd568bdced (diff) | |
download | linux-stable-6024e16654c1e1a2475e848d735963d05a12dba9.tar.gz linux-stable-6024e16654c1e1a2475e848d735963d05a12dba9.tar.bz2 linux-stable-6024e16654c1e1a2475e848d735963d05a12dba9.zip |
mmc: dw_mmc: set to MMC_CAP_ERASE by default
This flag needs to use the trim/discard/erase commands.
dwmmc controller enables this flag by default.
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/dw_mmc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 2dfdc58bae13..32380d5d4f6b 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2604,6 +2604,12 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) if (host->pdata->caps) mmc->caps = host->pdata->caps; + /* + * Support MMC_CAP_ERASE by default. + * It needs to use trim/discard/erase commands. + */ + mmc->caps |= MMC_CAP_ERASE; + if (host->pdata->pm_caps) mmc->pm_caps = host->pdata->pm_caps; |