aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/card/block.c1
-rw-r--r--drivers/mmc/host/at91_mci.c4
-rw-r--r--drivers/mmc/host/au1xmmc.c26
-rw-r--r--include/linux/mmc/core.h1
4 files changed, 16 insertions, 16 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 9abf29f8435b..ab510689ecde 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -241,7 +241,6 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req)
241 brq.data.blocks = 1; 241 brq.data.blocks = 1;
242 242
243 if (brq.data.blocks > 1) { 243 if (brq.data.blocks > 1) {
244 brq.data.flags |= MMC_DATA_MULTI;
245 brq.mrq.stop = &brq.stop; 244 brq.mrq.stop = &brq.stop;
246 readcmd = MMC_READ_MULTIPLE_BLOCK; 245 readcmd = MMC_READ_MULTIPLE_BLOCK;
247 writecmd = MMC_WRITE_MULTIPLE_BLOCK; 246 writecmd = MMC_WRITE_MULTIPLE_BLOCK;
diff --git a/drivers/mmc/host/at91_mci.c b/drivers/mmc/host/at91_mci.c
index 576d7cb0b3ec..8ec317802347 100644
--- a/drivers/mmc/host/at91_mci.c
+++ b/drivers/mmc/host/at91_mci.c
@@ -328,7 +328,7 @@ static void at91_mci_handle_transmitted(struct at91mci_host *host)
328 data = cmd->data; 328 data = cmd->data;
329 if (!data) return; 329 if (!data) return;
330 330
331 if (cmd->data->flags & MMC_DATA_MULTI) { 331 if (cmd->data->blocks > 1) {
332 pr_debug("multiple write : wait for BLKE...\n"); 332 pr_debug("multiple write : wait for BLKE...\n");
333 at91_mci_write(host, AT91_MCI_IER, AT91_MCI_BLKE); 333 at91_mci_write(host, AT91_MCI_IER, AT91_MCI_BLKE);
334 } else 334 } else
@@ -439,7 +439,7 @@ static void at91_mci_send_command(struct at91mci_host *host, struct mmc_command
439 439
440 if (data->flags & MMC_DATA_STREAM) 440 if (data->flags & MMC_DATA_STREAM)
441 cmdr |= AT91_MCI_TRTYP_STREAM; 441 cmdr |= AT91_MCI_TRTYP_STREAM;
442 if (data->flags & MMC_DATA_MULTI) 442 if (data->blocks > 1)
443 cmdr |= AT91_MCI_TRTYP_MULTIPLE; 443 cmdr |= AT91_MCI_TRTYP_MULTIPLE;
444 } 444 }
445 else { 445 else {
diff --git a/drivers/mmc/host/au1xmmc.c b/drivers/mmc/host/au1xmmc.c
index 49b0367e57c8..92c4d0dfee43 100644
--- a/drivers/mmc/host/au1xmmc.c
+++ b/drivers/mmc/host/au1xmmc.c
@@ -186,7 +186,7 @@ static void au1xmmc_tasklet_finish(unsigned long param)
186} 186}
187 187
188static int au1xmmc_send_command(struct au1xmmc_host *host, int wait, 188static int au1xmmc_send_command(struct au1xmmc_host *host, int wait,
189 struct mmc_command *cmd, unsigned int flags) 189 struct mmc_command *cmd, struct mmc_data *data)
190{ 190{
191 u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT); 191 u32 mmccmd = (cmd->opcode << SD_CMD_CI_SHIFT);
192 192
@@ -211,16 +211,18 @@ static int au1xmmc_send_command(struct au1xmmc_host *host, int wait,
211 return -EINVAL; 211 return -EINVAL;
212 } 212 }
213 213
214 if (flags & MMC_DATA_READ) { 214 if (data) {
215 if (flags & MMC_DATA_MULTI) 215 if (flags & MMC_DATA_READ) {
216 mmccmd |= SD_CMD_CT_4; 216 if (data->blocks > 1)
217 else 217 mmccmd |= SD_CMD_CT_4;
218 mmccmd |= SD_CMD_CT_2; 218 else
219 } else if (flags & MMC_DATA_WRITE) { 219 mmccmd |= SD_CMD_CT_2;
220 if (flags & MMC_DATA_MULTI) 220 } else if (flags & MMC_DATA_WRITE) {
221 mmccmd |= SD_CMD_CT_3; 221 if (data->blocks > 1)
222 else 222 mmccmd |= SD_CMD_CT_3;
223 mmccmd |= SD_CMD_CT_1; 223 else
224 mmccmd |= SD_CMD_CT_1;
225 }
224 } 226 }
225 227
226 au_writel(cmd->arg, HOST_CMDARG(host)); 228 au_writel(cmd->arg, HOST_CMDARG(host));
@@ -673,7 +675,7 @@ static void au1xmmc_request(struct mmc_host* mmc, struct mmc_request* mrq)
673 } 675 }
674 676
675 if (!ret) 677 if (!ret)
676 ret = au1xmmc_send_command(host, 0, mrq->cmd, flags); 678 ret = au1xmmc_send_command(host, 0, mrq->cmd, mrq->data);
677 679
678 if (ret) { 680 if (ret) {
679 mrq->cmd->error = ret; 681 mrq->cmd->error = ret;
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index 2a03f8b9cdfb..29c98ae10aff 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -83,7 +83,6 @@ struct mmc_data {
83#define MMC_DATA_WRITE (1 << 8) 83#define MMC_DATA_WRITE (1 << 8)
84#define MMC_DATA_READ (1 << 9) 84#define MMC_DATA_READ (1 << 9)
85#define MMC_DATA_STREAM (1 << 10) 85#define MMC_DATA_STREAM (1 << 10)
86#define MMC_DATA_MULTI (1 << 11)
87 86
88 unsigned int bytes_xfered; 87 unsigned int bytes_xfered;
89 88