aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/omap.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-06-04 12:51:15 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-06-19 08:05:08 -0400
commita3fd4a1b9ced850ac1a9d5bb9f8fab494d07f3fa (patch)
treedc2b9354fe087663cc862a966d12824601702c29 /drivers/mmc/omap.c
parent12223dabc617a4babfba4e17feb1ed88e8cfeb8f (diff)
[MMC] Convert all hosts except mmci to use data->blksz
The MMC specification allows non-power of two block sizes. As such, we should not pass the log2 block size to host drivers, but instead pass the byte size. However, ARM MMCI can only work with log2 block size, so continue to pass both the log2 block size and byte block size. This means that for the moment, the byte block size must remain a power of two, but this is the first stage of removing this restriction for other hosts. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mmc/omap.c')
-rw-r--r--drivers/mmc/omap.c6
1 files changed, 3 insertions, 3 deletions
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);