浏览代码

Improve the clock Settings for switching to high speed mode in the SDIO framework.

guozhanxin 4 年之前
父节点
当前提交
bb016927f8
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      components/drivers/sdio/sdio.c

+ 3 - 3
components/drivers/sdio/sdio.c

@@ -892,9 +892,9 @@ static rt_int32_t sdio_init_card(struct rt_mmcsd_host *host, rt_uint32_t ocr)
 
     if (card->flags & CARD_FLAG_HIGHSPEED) 
     {
-        mmcsd_set_clock(host, 50000000);
-    } 
-    else 
+        mmcsd_set_clock(host, card->host->freq_max > 50000000 ? 50000000 : card->host->freq_max);
+    }
+    else
     {
         mmcsd_set_clock(host, card->cis.max_tran_speed);
     }