From: Jaehoon Chung Date: Thu, 17 Nov 2016 07:40:36 +0000 (+0900) Subject: mmc: dw_mmc: use the hold register when send stop command X-Git-Tag: v4.10-rc1~164^2~76 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8c005b409080b5c98b74b96642d2aacf7f099cf0;p=karo-tx-linux.git mmc: dw_mmc: use the hold register when send stop command If DW_MMC_CARD_NO_USE_HOLD isn't set, it's usesd by default. Enve if SDMMC_CMD_USB_HOLD_REG is set in prepare_command(), but it doesn't set in pre_stop_abort(). To maintain the consistency, add the checking condition for this. Signed-off-by: Jaehoon Chung Tested-by: Heiko Stuebner Reviewed-by: Shawn Lin Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 7c7cbb763deb..a7620ff56e8e 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -337,6 +337,9 @@ static u32 dw_mci_prep_stop_abort(struct dw_mci *host, struct mmc_command *cmd) cmdr = stop->opcode | SDMMC_CMD_STOP | SDMMC_CMD_RESP_CRC | SDMMC_CMD_RESP_EXP; + if (!test_bit(DW_MMC_CARD_NO_USE_HOLD, &host->cur_slot->flags)) + cmdr |= SDMMC_CMD_USE_HOLD_REG; + return cmdr; }