aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2017-01-24 19:29:02 +0100
committerWolfram Sang <wsa@the-dreams.de>2017-02-13 18:55:47 +0100
commite203d38a0907e01a91ef0485307347ca857b346b (patch)
treeedc4e9ea85d502fd71782af4d27a7267b3de6385
parent91822393fdb3c6012b3ad150ee702dbaaf43560a (diff)
downloadlinux-renesas/topic/sdhi-autocmd12-resp.tar.gz
mmc: host: tmio: fill in response from auto cmd12renesas/topic/sdhi-autocmd12-resp
After we received the dataend interrupt, R1 response register carries the value from the automatically generated stop command. Report that info back to the MMC block layer, so we will be notified in case of e.g. ECC errors which happened during the last transfer. Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-rw-r--r--drivers/mmc/host/tmio_mmc_pio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index b47dd9195fe3fe..a08db28b0100d6 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -557,6 +557,9 @@ void tmio_mmc_do_data_irq(struct tmio_mmc_host *host)
dev_err(&host->pdev->dev, "unsupported stop: CMD%u,0x%x. We did CMD12,0\n",
stop->opcode, stop->arg);
+ /* fill in response from auto CMD12 */
+ stop->resp[0] = sd_ctrl_read16_and_16_as_32(host, CTL_RESPONSE);
+
sd_ctrl_write16(host, CTL_STOP_INTERNAL_ACTION, 0);
}