diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-02-02 07:23:12 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-02-02 07:23:12 -0500 |
commit | e92251762d02a46177d4105d1744041e3f8bc465 (patch) | |
tree | 4696c14854b2a5f3982a613fed63e01d941727f3 /drivers/mmc/mmc_block.c | |
parent | a6df590dd8b7644c8e298e3b13442bcd6ceeb739 (diff) |
[MMC] Add MMC command type flags
Some hosts need to know the command type, so pass it via a set of
flags in cmd->flags.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc/mmc_block.c')
-rw-r--r-- | drivers/mmc/mmc_block.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index 5b014c370e80..8eb2a2ede64b 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c | |||
@@ -171,14 +171,14 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
171 | brq.mrq.data = &brq.data; | 171 | brq.mrq.data = &brq.data; |
172 | 172 | ||
173 | brq.cmd.arg = req->sector << 9; | 173 | brq.cmd.arg = req->sector << 9; |
174 | brq.cmd.flags = MMC_RSP_R1; | 174 | brq.cmd.flags = MMC_RSP_R1 | MMC_CMD_ADTC; |
175 | brq.data.timeout_ns = card->csd.tacc_ns * 10; | 175 | brq.data.timeout_ns = card->csd.tacc_ns * 10; |
176 | brq.data.timeout_clks = card->csd.tacc_clks * 10; | 176 | brq.data.timeout_clks = card->csd.tacc_clks * 10; |
177 | brq.data.blksz_bits = md->block_bits; | 177 | brq.data.blksz_bits = md->block_bits; |
178 | brq.data.blocks = req->nr_sectors >> (md->block_bits - 9); | 178 | brq.data.blocks = req->nr_sectors >> (md->block_bits - 9); |
179 | brq.stop.opcode = MMC_STOP_TRANSMISSION; | 179 | brq.stop.opcode = MMC_STOP_TRANSMISSION; |
180 | brq.stop.arg = 0; | 180 | brq.stop.arg = 0; |
181 | brq.stop.flags = MMC_RSP_R1B; | 181 | brq.stop.flags = MMC_RSP_R1B | MMC_CMD_AC; |
182 | 182 | ||
183 | if (rq_data_dir(req) == READ) { | 183 | if (rq_data_dir(req) == READ) { |
184 | brq.cmd.opcode = brq.data.blocks > 1 ? MMC_READ_MULTIPLE_BLOCK : MMC_READ_SINGLE_BLOCK; | 184 | brq.cmd.opcode = brq.data.blocks > 1 ? MMC_READ_MULTIPLE_BLOCK : MMC_READ_SINGLE_BLOCK; |
@@ -223,7 +223,7 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
223 | 223 | ||
224 | cmd.opcode = MMC_SEND_STATUS; | 224 | cmd.opcode = MMC_SEND_STATUS; |
225 | cmd.arg = card->rca << 16; | 225 | cmd.arg = card->rca << 16; |
226 | cmd.flags = MMC_RSP_R1; | 226 | cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; |
227 | err = mmc_wait_for_cmd(card->host, &cmd, 5); | 227 | err = mmc_wait_for_cmd(card->host, &cmd, 5); |
228 | if (err) { | 228 | if (err) { |
229 | printk(KERN_ERR "%s: error %d requesting status\n", | 229 | printk(KERN_ERR "%s: error %d requesting status\n", |
@@ -430,7 +430,7 @@ mmc_blk_set_blksize(struct mmc_blk_data *md, struct mmc_card *card) | |||
430 | mmc_card_claim_host(card); | 430 | mmc_card_claim_host(card); |
431 | cmd.opcode = MMC_SET_BLOCKLEN; | 431 | cmd.opcode = MMC_SET_BLOCKLEN; |
432 | cmd.arg = 1 << md->block_bits; | 432 | cmd.arg = 1 << md->block_bits; |
433 | cmd.flags = MMC_RSP_R1; | 433 | cmd.flags = MMC_RSP_R1 | MMC_CMD_AC; |
434 | err = mmc_wait_for_cmd(card->host, &cmd, 5); | 434 | err = mmc_wait_for_cmd(card->host, &cmd, 5); |
435 | mmc_card_release_host(card); | 435 | mmc_card_release_host(card); |
436 | 436 | ||