]> git.sur5r.net Git - u-boot/blobdiff - drivers/mmc/gen_atmel_mci.c
disk/part.c: Make features optional
[u-boot] / drivers / mmc / gen_atmel_mci.c
index 6577925b8ecc558e91b160acc571c6b2690d9c2d..d217574b57f7a3b0f34259a5c7616753d838ce28 100644 (file)
@@ -33,7 +33,7 @@
 #include <asm/errno.h>
 #include <asm/byteorder.h>
 #include <asm/arch/clk.h>
-#include <asm/arch/memory-map.h>
+#include <asm/arch/hardware.h>
 #include "atmel_mci.h"
 
 #ifndef CONFIG_SYS_MMC_CLK_OD
@@ -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);