فهرست منبع

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>
Andrew Gabbasov 10 سال پیش
والد
کامیت
5af8f45cd0
1فایلهای تغییر یافته به همراه6 افزوده شده و 0 حذف شده
  1. 6 0
      drivers/mmc/mmc.c

+ 6 - 0
drivers/mmc/mmc.c

@@ -1188,6 +1188,12 @@ static int mmc_startup(struct mmc *mmc)
 
 
 	mmc_set_clock(mmc, mmc->tran_speed);
 	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 */
 	/* fill in device description */
 	mmc->block_dev.lun = 0;
 	mmc->block_dev.lun = 0;
 	mmc->block_dev.type = 0;
 	mmc->block_dev.type = 0;