]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mmc: host: tmio: fill in response from auto cmd12
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 14 Mar 2017 10:09:19 +0000 (11:09 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 24 Apr 2017 19:41:16 +0000 (21:41 +0200)
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>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/tmio_mmc_pio.c

index 42a912a3de677cf489e72b3fed1271efdb1ae292..5b01d22932cdbfc8958c0dfdf672f69ca3294871 100644 (file)
@@ -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);
 
                        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);
        }
 
                sd_ctrl_write16(host, CTL_STOP_INTERNAL_ACTION, 0);
        }