aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/wbsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/wbsd.c')
-rw-r--r--drivers/mmc/wbsd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c
index 39b3d97f891e..8167332d4013 100644
--- a/drivers/mmc/wbsd.c
+++ b/drivers/mmc/wbsd.c
@@ -662,14 +662,14 @@ static void wbsd_prepare_data(struct wbsd_host *host, struct mmc_data *data)
662 unsigned long dmaflags; 662 unsigned long dmaflags;
663 663
664 DBGF("blksz %04x blks %04x flags %08x\n", 664 DBGF("blksz %04x blks %04x flags %08x\n",
665 1 << data->blksz_bits, data->blocks, data->flags); 665 data->blksz, data->blocks, data->flags);
666 DBGF("tsac %d ms nsac %d clk\n", 666 DBGF("tsac %d ms nsac %d clk\n",
667 data->timeout_ns / 1000000, data->timeout_clks); 667 data->timeout_ns / 1000000, data->timeout_clks);
668 668
669 /* 669 /*
670 * Calculate size. 670 * Calculate size.
671 */ 671 */
672 host->size = data->blocks << data->blksz_bits; 672 host->size = data->blocks * data->blksz;
673 673
674 /* 674 /*
675 * Check timeout values for overflow. 675 * Check timeout values for overflow.
@@ -696,12 +696,12 @@ static void wbsd_prepare_data(struct wbsd_host *host, struct mmc_data *data)
696 * Two bytes are needed for each data line. 696 * Two bytes are needed for each data line.
697 */ 697 */
698 if (host->bus_width == MMC_BUS_WIDTH_1) { 698 if (host->bus_width == MMC_BUS_WIDTH_1) {
699 blksize = (1 << data->blksz_bits) + 2; 699 blksize = data->blksz + 2;
700 700
701 wbsd_write_index(host, WBSD_IDX_PBSMSB, (blksize >> 4) & 0xF0); 701 wbsd_write_index(host, WBSD_IDX_PBSMSB, (blksize >> 4) & 0xF0);
702 wbsd_write_index(host, WBSD_IDX_PBSLSB, blksize & 0xFF); 702 wbsd_write_index(host, WBSD_IDX_PBSLSB, blksize & 0xFF);
703 } else if (host->bus_width == MMC_BUS_WIDTH_4) { 703 } else if (host->bus_width == MMC_BUS_WIDTH_4) {
704 blksize = (1 << data->blksz_bits) + 2 * 4; 704 blksize = data->blksz + 2 * 4;
705 705
706 wbsd_write_index(host, WBSD_IDX_PBSMSB, 706 wbsd_write_index(host, WBSD_IDX_PBSMSB,
707 ((blksize >> 4) & 0xF0) | WBSD_DATA_WIDTH); 707 ((blksize >> 4) & 0xF0) | WBSD_DATA_WIDTH);