Commit Graph

25 Commits

Author SHA1 Message Date
7YZ7 501b22aabe
[HUST CSE] Fix many abnormal symbols in annotations and format code 2023-04-17 22:26:23 -04:00
Bernard Xiong 2aa600e01b
[components] fix compiling warning (#6733) 2022-12-13 09:44:45 +08:00
guo ecf2d82159
sync branch rt-smart. (#6641)
* Synchronize the code of the rt mart branch to the master branch.
  * TTY device
  * Add lwP code from rt-smart
  * Add vnode in DFS, but DFS will be re-write for rt-smart
  * There are three libcpu for rt-smart:
    * arm/cortex-a, arm/aarch64
    * riscv64

Co-authored-by: Rbb666 <zhangbingru@rt-thread.com>
Co-authored-by: zhkag <zhkag@foxmail.com>
2022-12-03 12:07:44 +08:00
xiao xie 1755750b2a
[sdio] remove mmcsd_delay_ms
修改SD检测线程函数里面的延时实现,将mmcsd_delay_ms改为rt_thread_mdelay. mmcsd_delay_ms过时且延时计算错误。
2022-11-08 00:34:43 -05:00
Tangyuxin a4829b1c00
[fix] Fix simulator compilation warnings (#6438)
* [fix] Fix simulator compilation warnings

* Update bsp/simulator/rtconfig_project.h

Co-authored-by: Man, Jianting (Meco) <920369182@qq.com>
2022-09-20 10:31:11 -04:00
tyx 782b9dd45a [components][sdio] Support DDR mode 2022-04-06 16:06:46 +08:00
nongxiaoming cec72c92c7 [components][sdio] fix compile warning and optimized code. 2021-12-31 17:05:42 +08:00
@lin12345678 9f9c3a2bb0 修改mmc初始化错误,将card-》csd写成card-》cid 2021-07-09 17:53:07 +08:00
Jianjia Ma 398718f0f9
Update mmc.c 2021-04-13 18:27:53 +01:00
Jianjia Ma 4e74279d27
Add more trys when switching data width
Try a few times before switching to other data widths. 
The original strategy (simply wait for 20ms ) failed on STM32H743 with an MTFC4GACAJCN-4M (4GB EMMC) when switching data width. 
(unless the debugging info is enabled, which add more delays)
With this EMMC, the fixed delay was set to 50ms for it to be able to work. 

Instead of a fixed delay, I think we better change to trying a few more times with smaller delays.
2021-04-13 18:04:59 +01:00
Meco Man 3c05a4e719 [compoenets] auto & manual formatted 2021-03-08 18:19:04 +08:00
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
Shawn Lin 11277014a3 [Components] sdio: try bus width depends on host's capability
It makes no sense to try bus width if not supported by drivers or BSP,
since we know it must be failed. It saves a lot for booting in time
critical environment.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
2020-03-12 09:00:41 +08:00
Zhou Yanjie de69a9b500 sdio: mmc.c: 修复缩进/Fix indentation.
修复版权信息中的缩进格式。

Fix indentation in copyright information.

Signed-off-by: Zhou Yanjie <zhouyanjie@zoho.com>
2019-07-19 21:18:56 +08:00
Zhou Yanjie 976ea24112 sdio: mmc.c: 防止容量计算过程溢出/Prevent capacity calculation overflow.
修改“mmc_parse_ext_csd”函数,防止容量计算过程溢出。

Modify the "mmc_parse_ext_csd" function to prevent the capacity
calculation process from overflowing.

Signed-off-by: Zhou Yanjie <zhouyanjie@zoho.com>
2019-07-19 21:18:56 +08:00
armink fa4d4ab7cf Update all of debug log definition to DBG_TAG and DBG_LVL. 2019-04-12 10:18:57 +08:00
armink 0d7ba79219 Remove the DBG_COLOR and DBG_ENABLE definition. 2019-03-06 17:54:30 +08:00
armink 5a70247898 [components][DeviceDriver] Update log tag from [SDIO] to SDIO. 2018-11-02 10:15:29 +08:00
Bernard Xiong 2c0640a178 [license] Change license to Apache. 2018-10-14 19:37:18 +08:00
ZYH 2e74539130 [Components][SDIO]fix 'rocr' declared without an initial value 2018-09-30 11:01:06 +08:00
ZYH 780f538525 [Components][SDIO][MMC] fix null point check 2018-09-22 15:02:48 +08:00
EvalZero 2c01189114 [DeviceDriver][SDIO] Update sdio debug log. 2018-09-05 14:50:43 +08:00
tangyuxin f850a2dd33 [components][drivers]sdio 给局部指针变量赋初值,修复潜在问题 2018-06-26 11:09:13 +08:00
weety 28f2fbd4cc 1.Fixed sdmmc cmd retries issue; 2015-06-22 21:28:42 +08:00
weety 41597e8793 Add mmc and emmc drivers. 2015-06-20 23:23:32 +08:00