diff options
-rw-r--r-- | drivers/mmc/at91_mci.c | 2 | ||||
-rw-r--r-- | drivers/mmc/imxmmc.c | 2 | ||||
-rw-r--r-- | drivers/mmc/omap.c | 6 | ||||
-rw-r--r-- | drivers/mmc/sdhci.c | 8 |
4 files changed, 9 insertions, 9 deletions
diff --git a/drivers/mmc/at91_mci.c b/drivers/mmc/at91_mci.c index 88f0eef9cf33..42284e1d4628 100644 --- a/drivers/mmc/at91_mci.c +++ b/drivers/mmc/at91_mci.c | |||
@@ -411,7 +411,7 @@ static unsigned int at91_mci_send_command(struct at91mci_host *host, struct mmc_ | |||
411 | } | 411 | } |
412 | 412 | ||
413 | if (data) { | 413 | if (data) { |
414 | block_length = 1 << data->blksz_bits; | 414 | block_length = data->blksz; |
415 | blocks = data->blocks; | 415 | blocks = data->blocks; |
416 | 416 | ||
417 | /* always set data start - also set direction flag for read */ | 417 | /* always set data start - also set direction flag for read */ |
diff --git a/drivers/mmc/imxmmc.c b/drivers/mmc/imxmmc.c index a4eb1d0e7a71..5c62f4e6ad06 100644 --- a/drivers/mmc/imxmmc.c +++ b/drivers/mmc/imxmmc.c | |||
@@ -228,7 +228,7 @@ static int imxmci_busy_wait_for_status(struct imxmci_host *host, | |||
228 | static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) | 228 | static void imxmci_setup_data(struct imxmci_host *host, struct mmc_data *data) |
229 | { | 229 | { |
230 | unsigned int nob = data->blocks; | 230 | unsigned int nob = data->blocks; |
231 | unsigned int blksz = 1 << data->blksz_bits; | 231 | unsigned int blksz = data->blksz; |
232 | unsigned int datasz = nob * blksz; | 232 | unsigned int datasz = nob * blksz; |
233 | int i; | 233 | int i; |
234 | 234 | ||
diff --git a/drivers/mmc/omap.c b/drivers/mmc/omap.c index becb3c68c34d..c25244b3657b 100644 --- a/drivers/mmc/omap.c +++ b/drivers/mmc/omap.c | |||
@@ -584,10 +584,10 @@ mmc_omap_prepare_dma(struct mmc_omap_host *host, struct mmc_data *data) | |||
584 | int sync_dev = 0; | 584 | int sync_dev = 0; |
585 | 585 | ||
586 | data_addr = io_v2p((u32) host->base) + OMAP_MMC_REG_DATA; | 586 | data_addr = io_v2p((u32) host->base) + OMAP_MMC_REG_DATA; |
587 | frame = 1 << data->blksz_bits; | 587 | frame = data->blksz; |
588 | count = sg_dma_len(sg); | 588 | count = sg_dma_len(sg); |
589 | 589 | ||
590 | if ((data->blocks == 1) && (count > (1 << data->blksz_bits))) | 590 | if ((data->blocks == 1) && (count > data->blksz)) |
591 | count = frame; | 591 | count = frame; |
592 | 592 | ||
593 | host->dma_len = count; | 593 | host->dma_len = count; |
@@ -776,7 +776,7 @@ mmc_omap_prepare_data(struct mmc_omap_host *host, struct mmc_request *req) | |||
776 | } | 776 | } |
777 | 777 | ||
778 | 778 | ||
779 | block_size = 1 << data->blksz_bits; | 779 | block_size = data->blksz; |
780 | 780 | ||
781 | OMAP_MMC_WRITE(host->base, NBLK, data->blocks - 1); | 781 | OMAP_MMC_WRITE(host->base, NBLK, data->blocks - 1); |
782 | OMAP_MMC_WRITE(host->base, BLEN, block_size - 1); | 782 | OMAP_MMC_WRITE(host->base, BLEN, block_size - 1); |
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index 6bfcdbc7491e..8e9100bd57ef 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c | |||
@@ -268,7 +268,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) | |||
268 | } | 268 | } |
269 | 269 | ||
270 | DBG("blksz %04x blks %04x flags %08x\n", | 270 | DBG("blksz %04x blks %04x flags %08x\n", |
271 | 1 << data->blksz_bits, data->blocks, data->flags); | 271 | data->blksz, data->blocks, data->flags); |
272 | DBG("tsac %d ms nsac %d clk\n", | 272 | DBG("tsac %d ms nsac %d clk\n", |
273 | data->timeout_ns / 1000000, data->timeout_clks); | 273 | data->timeout_ns / 1000000, data->timeout_clks); |
274 | 274 | ||
@@ -282,7 +282,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) | |||
282 | 282 | ||
283 | writew(mode, host->ioaddr + SDHCI_TRANSFER_MODE); | 283 | writew(mode, host->ioaddr + SDHCI_TRANSFER_MODE); |
284 | 284 | ||
285 | writew(1 << data->blksz_bits, host->ioaddr + SDHCI_BLOCK_SIZE); | 285 | writew(data->blksz, host->ioaddr + SDHCI_BLOCK_SIZE); |
286 | writew(data->blocks, host->ioaddr + SDHCI_BLOCK_COUNT); | 286 | writew(data->blocks, host->ioaddr + SDHCI_BLOCK_COUNT); |
287 | 287 | ||
288 | if (host->flags & SDHCI_USE_DMA) { | 288 | if (host->flags & SDHCI_USE_DMA) { |
@@ -294,7 +294,7 @@ static void sdhci_prepare_data(struct sdhci_host *host, struct mmc_data *data) | |||
294 | 294 | ||
295 | writel(sg_dma_address(data->sg), host->ioaddr + SDHCI_DMA_ADDRESS); | 295 | writel(sg_dma_address(data->sg), host->ioaddr + SDHCI_DMA_ADDRESS); |
296 | } else { | 296 | } else { |
297 | host->size = (1 << data->blksz_bits) * data->blocks; | 297 | host->size = data->blksz * data->blocks; |
298 | 298 | ||
299 | host->cur_sg = data->sg; | 299 | host->cur_sg = data->sg; |
300 | host->num_sg = data->sg_len; | 300 | host->num_sg = data->sg_len; |
@@ -335,7 +335,7 @@ static void sdhci_finish_data(struct sdhci_host *host) | |||
335 | blocks = 0; | 335 | blocks = 0; |
336 | else | 336 | else |
337 | blocks = readw(host->ioaddr + SDHCI_BLOCK_COUNT); | 337 | blocks = readw(host->ioaddr + SDHCI_BLOCK_COUNT); |
338 | data->bytes_xfered = (1 << data->blksz_bits) * (data->blocks - blocks); | 338 | data->bytes_xfered = data->blksz * (data->blocks - blocks); |
339 | 339 | ||
340 | if ((data->error == MMC_ERR_NONE) && blocks) { | 340 | if ((data->error == MMC_ERR_NONE) && blocks) { |
341 | printk(KERN_ERR "%s: Controller signalled completion even " | 341 | printk(KERN_ERR "%s: Controller signalled completion even " |