S5P: mmc: Resolved interrupt error during mmc_init
authorChander Kashyap <chander.kashyap@linaro.org>
Tue, 22 Mar 2011 01:40:50 +0000 (01:40 +0000)
committerAlbert Aribaud <albert.aribaud@free.fr>
Sun, 27 Mar 2011 17:20:26 +0000 (19:20 +0200)
Blocksize was hardcoded to 512 bytes. But the blocksize varies
depeding on various mmc subsystem commands (between 8 and 512).
This hardcoding was resulting in interrupt error during data
transfer.

It is now calculated based upon the request sent by mmc subsystem.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
drivers/mmc/s5p_mmc.c

index 195b5be39ea2d33fe12168d3603c165a48727dae..0323800711ba16104c9b1a092b4e88b5ba70ece6 100644 (file)
@@ -51,7 +51,7 @@ static void mmc_prepare_data(struct mmc_host *host, struct mmc_data *data)
        writeb(ctrl, &host->reg->hostctl);
 
        /* We do not handle DMA boundaries, so set it to max (512 KiB) */
-       writew((7 << 12) | (512 << 0), &host->reg->blksize);
+       writew((7 << 12) | (data->blocksize & 0xFFF), &host->reg->blksize);
        writew(data->blocks, &host->reg->blkcnt);
 }