mmc: mmc: extend the mmc_send_tuning()
authorChaotian Jing <chaotian.jing@mediatek.com>
Tue, 27 Oct 2015 06:24:28 +0000 (14:24 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 27 Oct 2015 09:38:41 +0000 (10:38 +0100)
commit9979dbe5158899b556eb772b7335e29417ac0ddd
tree23c3b19e0caeb3b6ed96db532eafbfdd7c300aca
parentc9b5061e7728da1f7192ecaf3ffab4a7300920dc
mmc: mmc: extend the mmc_send_tuning()

The mmc_execute_tuning() has already prepared the opcode,
there is no need to prepare it again at mmc_send_tuning(),
and, there is a BUG of mmc_send_tuning() to determine the opcode
by bus width, assume eMMC was running at HS200, 4bit mode,
then the mmc_send_tuning() will overwrite the opcode from CMD21
to CMD19, then got error.

in addition, extend an argument of "cmd_error" to allow getting
if there was cmd error when tune response.

Signed-off-by: Chaotian Jing <chaotian.jing@mediatek.com>
[Ulf: Rebased patch]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/core/mmc_ops.c
drivers/mmc/host/dw_mmc-exynos.c
drivers/mmc/host/dw_mmc-rockchip.c
drivers/mmc/host/dw_mmc.c
drivers/mmc/host/dw_mmc.h
drivers/mmc/host/sdhci-esdhc-imx.c
drivers/mmc/host/sdhci-msm.c
drivers/mmc/host/sdhci-sirf.c
include/linux/mmc/core.h