Commit da55c66ec92c962435175cf0b4f4d61732ca3ebf

Authored by Bo Shen
Committed by Pantelis Antoniou
1 parent 70ec3286e6

MMC: atmel_mci: enable high speed mode support

If the MCI IP version >= 0x300, it supports hight speed mode
option, this patch enable it.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>

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

drivers/mmc/gen_atmel_mci.c
... ... @@ -110,6 +110,9 @@
110 110 if (version >= 0x200)
111 111 writel(MMCI_BF(BLKLEN, blklen), &mci->blkr);
112 112  
  113 + if (mmc->card_caps & mmc->cfg->host_caps & MMC_MODE_HS)
  114 + writel(MMCI_BIT(HSMODE), &mci->cfg);
  115 +
113 116 initialized = 1;
114 117 }
115 118  
116 119  
... ... @@ -404,8 +407,10 @@
404 407 /* need to be able to pass these in on a board by board basis */
405 408 cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34;
406 409 version = atmel_mci_get_version(mci);
407   - if ((version & 0xf00) >= 0x300)
  410 + if ((version & 0xf00) >= 0x300) {
408 411 cfg->host_caps = MMC_MODE_8BIT;
  412 + cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;
  413 + }
409 414  
410 415 cfg->host_caps |= MMC_MODE_4BIT;
411 416