summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAndrew Gabbasov <andrew_gabbasov@mentor.com>2014-12-01 06:59:11 -0600
committerPantelis Antoniou <pantelis.antoniou@konsulko.com>2014-12-12 21:08:38 +0200
commit5af8f45cd049cf01790a17ff68e61303bc08abc3 (patch)
tree63a22cbc7dfb04492a69327e52bf10ec8392d84b /drivers
parent201d5ac4388d66bf7a78e71c32939b3fc5779207 (diff)
downloadu-boot-imx-5af8f45cd049cf01790a17ff68e61303bc08abc3.zip
u-boot-imx-5af8f45cd049cf01790a17ff68e61303bc08abc3.tar.gz
u-boot-imx-5af8f45cd049cf01790a17ff68e61303bc08abc3.tar.bz2
mmc: Fix block length for DDR mode
Block length for write and read commands is fixed to 512 bytes when the card is in Dual Data Rate mode. If block length read from CSD is different, make sure the driver will use correct length in all further calculations and settings. Signed-off-by: Andrew Gabbasov <andrew_gabbasov@mentor.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/mmc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 65d8b3a..1eb9c27 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1188,6 +1188,12 @@ static int mmc_startup(struct mmc *mmc)
mmc_set_clock(mmc, mmc->tran_speed);
+ /* Fix the block length for DDR mode */
+ if (mmc->ddr_mode) {
+ mmc->read_bl_len = MMC_MAX_BLOCK_LEN;
+ mmc->write_bl_len = MMC_MAX_BLOCK_LEN;
+ }
+
/* fill in device description */
mmc->block_dev.lun = 0;
mmc->block_dev.type = 0;