summaryrefslogtreecommitdiffstats
path: root/drivers/mci/mci-core.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-10-02 14:34:24 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-10-02 14:34:26 +0200
commit329db2f586c4125fc0255f1e111dae7602e9845b (patch)
treeae89ed7bb13081a584be922a074264fc6d0c0ab1 /drivers/mci/mci-core.c
parentaa2bb00effa30718fe6d95dc215a54ddb44b9e27 (diff)
downloadbarebox-329db2f586c4125fc0255f1e111dae7602e9845b.tar.gz
barebox-329db2f586c4125fc0255f1e111dae7602e9845b.tar.xz
mci: core: Increase clock for SD highspeed mode
Putting a SD card into highspeed mode doesn't help much when we still clock the card with 25MHz. Increase the clock speed to 50MHz for high speed cards. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci/mci-core.c')
-rw-r--r--drivers/mci/mci-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 6d5a4bfc6e..90001153d7 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -652,6 +652,9 @@ retry_scr:
if ((__be32_to_cpu(switch_status[4]) & 0x0f000000) == 0x01000000)
mci->card_caps |= MMC_CAP_SD_HIGHSPEED;
+ if (mci_caps(mci) & MMC_CAP_SD_HIGHSPEED)
+ mci->tran_speed = 50000000;
+
return 0;
}