mmc: dw_mmc-rockchip: fix failing to mount partition with "discard"

Without MMC_CAP_ERASE support, we fail to mount partition
with "discard" option since mmc_queue_setup_discard is limited
for checking mmc_can_erase. Without doing mmc_queue_setup_discard,
blk_queue_discard fails to test QUEUE_FLAG_DISCARD flag, so we get
the following log from f2fs(actually similar to other file system):

mounting with "discard" option, but the device does not support discard

Change-Id: Iee781795c9c61153644f0dd5b00dfc2cca6cc721
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
This commit is contained in:
Shawn Lin
2016-03-01 15:08:48 +08:00
parent 6662acdefe
commit 42ca4e06a9

View File

@@ -241,11 +241,12 @@ static int dw_mci_rockchip_init(struct dw_mci *host)
/* Common capabilities of RK3288 SoC */
static unsigned long dw_mci_rk3288_dwmmc_caps[4] = {
MMC_CAP_RUNTIME_RESUME, /* emmc */
MMC_CAP_RUNTIME_RESUME, /* sdmmc */
MMC_CAP_RUNTIME_RESUME, /* sdio0 */
MMC_CAP_RUNTIME_RESUME, /* sdio1 */
MMC_CAP_RUNTIME_RESUME | MMC_CAP_ERASE, /* emmc */
MMC_CAP_RUNTIME_RESUME | MMC_CAP_ERASE, /* sdmmc */
MMC_CAP_RUNTIME_RESUME | MMC_CAP_ERASE, /* sdio0 */
MMC_CAP_RUNTIME_RESUME | MMC_CAP_ERASE, /* sdio1 */
};
static const struct dw_mci_drv_data rk2928_drv_data = {
.prepare_command = dw_mci_rockchip_prepare_command,
.init = dw_mci_rockchip_init,