diff options
author | elen.song <elen.song@atmel.com> | 2011-07-12 00:17:07 +0000 |
---|---|---|
committer | Andy Fleming <afleming@freescale.com> | 2011-07-15 20:29:21 -0500 |
commit | c310fc840472a36e4b9d2505830e9dc8d458d63c (patch) | |
tree | 1fc6a019a440fc739b6e2dd4d0a86c6e8e8b3f88 /drivers/mmc/gen_atmel_mci.c | |
parent | b1f1e821d335de58d362bf3013c93cef86cdb356 (diff) | |
download | u-boot-imx-c310fc840472a36e4b9d2505830e9dc8d458d63c.zip u-boot-imx-c310fc840472a36e4b9d2505830e9dc8d458d63c.tar.gz u-boot-imx-c310fc840472a36e4b9d2505830e9dc8d458d63c.tar.bz2 |
AT91:mmc:fix multiple read/write error
According to datasheet,set block count before multiple read/write.
Signed-off-by: elen.song <elen.song@atmel.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'drivers/mmc/gen_atmel_mci.c')
-rw-r--r-- | drivers/mmc/gen_atmel_mci.c | 4 |
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); |