Commit 5af8f45cd049cf01790a17ff68e61303bc08abc3

Authored by Andrew Gabbasov
Committed by Pantelis Antoniou
1 parent 201d5ac438

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>

Showing 1 changed file with 6 additions and 0 deletions Side-by-side Diff

... ... @@ -1188,6 +1188,12 @@
1188 1188  
1189 1189 mmc_set_clock(mmc, mmc->tran_speed);
1190 1190  
  1191 + /* Fix the block length for DDR mode */
  1192 + if (mmc->ddr_mode) {
  1193 + mmc->read_bl_len = MMC_MAX_BLOCK_LEN;
  1194 + mmc->write_bl_len = MMC_MAX_BLOCK_LEN;
  1195 + }
  1196 +
1191 1197 /* fill in device description */
1192 1198 mmc->block_dev.lun = 0;
1193 1199 mmc->block_dev.type = 0;