diff options
| author | Bernard Xiong <[email protected]> | 2020-11-28 06:48:14 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-11-28 06:48:14 +0800 |
| commit | af95348bf1dd06ed2147cf9caee8a78513c31a72 (patch) | |
| tree | ff949a536a962896aec25ff73e0abd874c84a6af /components | |
| parent | fba1d75485f846d7a519b4cd4b72de51399fdc04 (diff) | |
| parent | bb016927f8a5ef4121e2e0c899291642c0087b71 (diff) | |
Merge pull request #4096 from Guozhanxin/sdio_fix
完善sdio框架中切换到高速模式时的时钟设置
Diffstat (limited to 'components')
| -rw-r--r-- | components/drivers/sdio/sdio.c | 6 |
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); } |
