summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2020-11-28 06:48:14 +0800
committerGitHub <[email protected]>2020-11-28 06:48:14 +0800
commitaf95348bf1dd06ed2147cf9caee8a78513c31a72 (patch)
treeff949a536a962896aec25ff73e0abd874c84a6af
parentfba1d75485f846d7a519b4cd4b72de51399fdc04 (diff)
parentbb016927f8a5ef4121e2e0c899291642c0087b71 (diff)
Merge pull request #4096 from Guozhanxin/sdio_fix
完善sdio框架中切换到高速模式时的时钟设置
-rw-r--r--components/drivers/sdio/sdio.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/components/drivers/sdio/sdio.c b/components/drivers/sdio/sdio.c
index 65bf87b895..f5d97cdd08 100644
--- a/components/drivers/sdio/sdio.c
+++ b/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);
}