From fe4a3c7a20f14d86022a8132adbf6ddb98e7197c Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Tue, 21 Nov 2006 17:54:23 +0100 Subject: mmc: Allow host drivers to specify a max block size Most controllers have an upper limit on the block size. Allow the host drivers to specify this and make sure we avoid hitting this limit. Signed-off-by: Pierre Ossman --- drivers/mmc/mmci.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers/mmc/mmci.c') diff --git a/drivers/mmc/mmci.c b/drivers/mmc/mmci.c index ccfe656..5d48e00 100644 --- a/drivers/mmc/mmci.c +++ b/drivers/mmc/mmci.c @@ -534,6 +534,11 @@ static int mmci_probe(struct amba_device *dev, void *id) */ mmc->max_seg_size = mmc->max_sectors << 9; + /* + * Block size can be up to 2048 bytes, but must be a power of two. + */ + mmc->max_blk_size = 2048; + spin_lock_init(&host->lock); writel(0, host->base + MMCIMASK0); -- cgit v1.1