aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2014-01-14 15:24:21 -0500
committerChris Ball <chris@printf.net>2014-02-23 10:40:54 -0500
commitbcc3e1726d827c2d6f62f0e0e7bbc99eed7ad925 (patch)
treeff7a18b517a530a4193229a0993b426b0e007bac /drivers/mmc
parentcb962e04b04fb67dbaf1455d3c60d64297ef4933 (diff)
mmc: block: Use R1 responses for stop cmds for read requests
While using open ended transmission and thus ending the transfer by sending a stop command, we shall use R1B only for writes and R1 shall be used for reads. Previously R1B were used in both cases. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/card/block.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index c2187d5e9070..156cabfa61c3 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -1334,7 +1334,6 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
1334 brq->data.blksz = 512; 1334 brq->data.blksz = 512;
1335 brq->stop.opcode = MMC_STOP_TRANSMISSION; 1335 brq->stop.opcode = MMC_STOP_TRANSMISSION;
1336 brq->stop.arg = 0; 1336 brq->stop.arg = 0;
1337 brq->stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B | MMC_CMD_AC;
1338 brq->data.blocks = blk_rq_sectors(req); 1337 brq->data.blocks = blk_rq_sectors(req);
1339 1338
1340 /* 1339 /*
@@ -1377,9 +1376,15 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
1377 if (rq_data_dir(req) == READ) { 1376 if (rq_data_dir(req) == READ) {
1378 brq->cmd.opcode = readcmd; 1377 brq->cmd.opcode = readcmd;
1379 brq->data.flags |= MMC_DATA_READ; 1378 brq->data.flags |= MMC_DATA_READ;
1379 if (brq->mrq.stop)
1380 brq->stop.flags = MMC_RSP_SPI_R1 | MMC_RSP_R1 |
1381 MMC_CMD_AC;
1380 } else { 1382 } else {
1381 brq->cmd.opcode = writecmd; 1383 brq->cmd.opcode = writecmd;
1382 brq->data.flags |= MMC_DATA_WRITE; 1384 brq->data.flags |= MMC_DATA_WRITE;
1385 if (brq->mrq.stop)
1386 brq->stop.flags = MMC_RSP_SPI_R1B | MMC_RSP_R1B |
1387 MMC_CMD_AC;
1383 } 1388 }
1384 1389
1385 if (do_rel_wr) 1390 if (do_rel_wr)