[PATCH] mci: core: Increase clock for SD highspeed mode

Sascha Hauer s.hauer at pengutronix.de
Fri Oct 2 05:35:44 PDT 2015


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 at pengutronix.de>
---
 drivers/mci/mci-core.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 6d5a4bf..9000115 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;
 }
 
-- 
2.6.0




More information about the barebox mailing list