aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorWolfgang Muees <wolfgang.mues@auerswald.de>2009-04-08 05:14:07 -0400
committerPierre Ossman <pierre@ossman.eu>2009-06-13 16:42:56 -0400
commit5cf20aa557e8f9dd5af302b8f33972082479753a (patch)
tree3883605cb5202c85ee7ff95493a43895d9b2183b /drivers/mmc
parent94d89efb2c347a82a08a61dbac8565b1087c3259 (diff)
mmc_spi: speedup for slow cards, less wear-out
Speedup for slow cards by transfering more data at once. This patch also reduces the amount of wear-out of the flash blocks because fewer partial blocks are written. Signed-off-by: Wolfgang Muees <wolfgang.mues@auerswald.de> Signed-off-by: Pierre Ossman <pierre@ossman.eu>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/mmc_spi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index f48349d18c92..a789db8eed28 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -97,6 +97,14 @@
97 */ 97 */
98#define r1b_timeout (HZ * 3) 98#define r1b_timeout (HZ * 3)
99 99
100/* One of the critical speed parameters is the amount of data which may
101 * be transfered in one command. If this value is too low, the SD card
102 * controller has to do multiple partial block writes (argggh!). With
103 * today (2008) SD cards there is little speed gain if we transfer more
104 * than 64 KBytes at a time. So use this value until there is any indication
105 * that we should do more here.
106 */
107#define MMC_SPI_BLOCKSATONCE 128
100 108
101/****************************************************************************/ 109/****************************************************************************/
102 110
@@ -1366,6 +1374,10 @@ static int mmc_spi_probe(struct spi_device *spi)
1366 1374
1367 mmc->ops = &mmc_spi_ops; 1375 mmc->ops = &mmc_spi_ops;
1368 mmc->max_blk_size = MMC_SPI_BLOCKSIZE; 1376 mmc->max_blk_size = MMC_SPI_BLOCKSIZE;
1377 mmc->max_hw_segs = MMC_SPI_BLOCKSATONCE;
1378 mmc->max_phys_segs = MMC_SPI_BLOCKSATONCE;
1379 mmc->max_req_size = MMC_SPI_BLOCKSATONCE * MMC_SPI_BLOCKSIZE;
1380 mmc->max_blk_count = MMC_SPI_BLOCKSATONCE;
1369 1381
1370 mmc->caps = MMC_CAP_SPI; 1382 mmc->caps = MMC_CAP_SPI;
1371 1383