summaryrefslogtreecommitdiff
path: root/drivers/mmc/gen_atmel_mci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/gen_atmel_mci.c')
-rw-r--r--drivers/mmc/gen_atmel_mci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
index f346b24..d217574 100644
--- a/drivers/mmc/gen_atmel_mci.c
+++ b/drivers/mmc/gen_atmel_mci.c
@@ -183,6 +183,10 @@ mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
/* Figure out the transfer arguments */
cmdr = mci_encode_cmd(cmd, data, &error_flags);
+ if (data)
+ writel(MMCI_BF(BCNT, data->blocks) |
+ MMCI_BF(BLKLEN, mmc->read_bl_len), &mci->blkr);
+
/* Send the command */
writel(cmd->cmdarg, &mci->argr);
writel(cmdr, &mci->cmdr);