rt-thread/components/drivers/sdio
Shawn Lin 4c7106fa9d component: sdio: fix potential ricky clock setting
Currently RTT mmc stack only support Highspeed mode or
blow, which means the max speed should be 52MHz according
to JEDEC spec. Two problems show here:

(1) max_data_rate = (unsigned int)-1. The value of unsigned int
depends on compilers/arch. Moreover, it makes no sense to assume
cpu addressing width with IP clock rate limit.
(1)hs_max_data_rate was set to 200MHz.

So what should BSP drivers do if 52MHz < max_data_rate < 200MHz?
Either it blindly sets a spec-violated clock rate to drive a Highspeed
card, or just adjust the clock rate internally. Both cases are
really bad for practice.

If the card claims to support Highspeed, we set the clock to not
to exceed 52MHz. Otherwise it should be set according to
card->max_data_rate parsed by ext_csd. This patch fixes it as-is,
and also simplify the code a lot.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-03-16 14:45:41 +08:00
..
SConscript Add mmc and emmc drivers. 2015-06-20 23:23:32 +08:00
block_dev.c [component] sdio: Fix mmc mount function if the whole device is a partition 2020-03-12 09:00:33 +08:00
mmc.c component: sdio: fix potential ricky clock setting 2020-03-16 14:45:41 +08:00
mmcsd_core.c fix raspi3-64 sdio driver 2020-02-28 14:56:56 +08:00
sd.c Update sd.c 2020-02-23 09:20:09 +08:00
sdio.c [components][drivers][sdio]修复 SDIO product 为空的问题 2019-09-03 16:55:10 +08:00