aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/wbsd.c
diff options
context:
space:
mode:
authorPavel Pisa <ppisa@pikron.com>2006-05-19 16:48:03 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-05-19 16:48:03 -0400
commit2c171bf13423dc5293188cea7f6c2da1720926e2 (patch)
treed251705f564c8ffb081ba84c769fd2d1b229db53 /drivers/mmc/wbsd.c
parenta54c9d30dbb06391ec4422aaf0e1dc2c8c53bd3e (diff)
[ARM] 3531/1: i.MX/MX1 SD/MMC ensure, that clock are stopped before new command and cleanups
Patch from Pavel Pisa There has been problems that for some paths that clock are not stopped during new command programming and initiation. Result is issuing of incorrect command to the card. Some other problems are cleaned too. Noisy report of known ERRATUM #4 has been suppressed. Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
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);