Commit a21da478 authored by Bryan O'Donoghue's avatar Bryan O'Donoghue
Browse files

drivers: imx: mxc_usdhc: Do not set MMC_RSP_48 for MMC_RESPONSE_R2

commit 97d5db8c reverts an update to the
MMC layer that accompanied the original submission of this MMC driver this
is the right-thing-to-do in terms of the MMC spec.

Unfortunately the reversion also breaks this driver. The issue is the i.MX
controller doesn't want MMC_RSP_48 set for MMC_RESPONSE_R2.

The appropriate place to place that constraint is obviously in
drivers/imx/usdhc/imx_usdhc.c not in the shared MMC codebase. This patch
restores the logic the i.MX controller requires without breaking it for
everyone else.

Fixes: 97d5db8c
Fixes: 2a82a9c9

Signed-off-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Cc: Jun Nie <jun.nie@linaro.org>
parent c6d1fe95
...@@ -160,7 +160,7 @@ static int imx_usdhc_send_cmd(struct mmc_cmd *cmd) ...@@ -160,7 +160,7 @@ static int imx_usdhc_send_cmd(struct mmc_cmd *cmd)
mixctl |= MIXCTRL_DMAEN; mixctl |= MIXCTRL_DMAEN;
} }
if (cmd->resp_type & MMC_RSP_48) if (cmd->resp_type & MMC_RSP_48 && cmd->resp_type != MMC_RESPONSE_R2)
xfertype |= XFERTYPE_RSPTYP_48; xfertype |= XFERTYPE_RSPTYP_48;
else if (cmd->resp_type & MMC_RSP_136) else if (cmd->resp_type & MMC_RSP_136)
xfertype |= XFERTYPE_RSPTYP_136; xfertype |= XFERTYPE_RSPTYP_136;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment