aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>2018-10-10 12:08:33 +0100
committerBryan O'Donoghue <bryan.odonoghue@linaro.org>2018-10-10 12:15:33 +0100
commita21da47806c1b4590b040f88a8667c2d37973bea (patch)
tree88e758fdaa7b100e00dbb390353312f627561cb7 /drivers
parentc6d1fe954ba0246b201c2c2646d24e49c11367d0 (diff)
downloadtrusted-firmware-a-a21da47806c1b4590b040f88a8667c2d37973bea.tar.gz
drivers: imx: mxc_usdhc: Do not set MMC_RSP_48 for MMC_RESPONSE_R2
commit 97d5db8c5cb95c7ce69ff4d36bcda2aeda143576 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: 97d5db8c5cb95c7ce69ff4d36bcda2aeda143576 Fixes: 2a82a9c95f6c06079f58d69315544a6b49cf64a4 Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Cc: Jun Nie <jun.nie@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/imx/usdhc/imx_usdhc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/imx/usdhc/imx_usdhc.c b/drivers/imx/usdhc/imx_usdhc.c
index ea96833f5a..1f9550e172 100644
--- a/drivers/imx/usdhc/imx_usdhc.c
+++ b/drivers/imx/usdhc/imx_usdhc.c
@@ -160,7 +160,7 @@ static int imx_usdhc_send_cmd(struct mmc_cmd *cmd)
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;
else if (cmd->resp_type & MMC_RSP_136)
xfertype |= XFERTYPE_RSPTYP_136;