X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fmmc%2Fgen_atmel_mci.c;h=d217574b57f7a3b0f34259a5c7616753d838ce28;hb=df3fc52608daa1e10332f59cd2f226ba400d1c98;hp=2984d645c9ddab0dfba0f9229eecc52f1d3e20bd;hpb=ac8983bcba75576c50307b5e8dc8fb848740ee61;p=u-boot diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c index 2984d645c9..d217574b57 100644 --- a/drivers/mmc/gen_atmel_mci.c +++ b/drivers/mmc/gen_atmel_mci.c @@ -33,7 +33,7 @@ #include #include #include -#include +#include #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); @@ -348,6 +352,8 @@ int atmel_mci_init(void *regs) mmc->f_min = get_mci_clk_rate() / (2*256); mmc->f_max = get_mci_clk_rate() / (2*1); + mmc->b_max = 0; + mmc_register(mmc); return 0;