summaryrefslogtreecommitdiff
path: root/components/drivers/sdio
diff options
context:
space:
mode:
authorthread-liu <[email protected]>2020-12-03 09:09:00 +0800
committerGitHub <[email protected]>2020-12-03 09:09:00 +0800
commitd97530e0ffc6e28a7a68f66dfcf775f02fc007e5 (patch)
tree523fdc8c8b15b4c68501ec7f09b29c26954a51db /components/drivers/sdio
parent73391c60fb7b26c5c05188b065196eea75d63145 (diff)
parentdf3d4b7bc9cab6dcc0aaf87cd32bd67bb1531036 (diff)
Merge branch 'master' into step4
Diffstat (limited to 'components/drivers/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);
}