“MMC overview”的版本间的差异
来自百问网嵌入式Linux wiki
Zhouyuebiao(讨论 | 贡献) |
|||
(未显示另一用户的1个中间版本) | |||
第1行: | 第1行: | ||
− | + | '''SUMMARY '''<br> | |
+ | MMC(MultiMediaCard)/ SD(安全数字)/ SDIO(安全数字输入/输出)子系统实现了标准的Linux <sup>®</ sup>主机驱动程序,可与MMC / SD存储卡或SDIO卡接口。 | ||
− | [[ | + | == Framework purpose == |
− | + | 本文的目的是通过以下方式介绍MMC Linux<sup>®</sup>子系统(MMC/SD): | |
− | + | * 提供一般信息 | |
+ | * 描述主要组成部分/利益相关者 | ||
+ | SDIO在[[WLAN_overview|WLAN overview]]中解决。 | ||
+ | |||
+ | ==System overview== | ||
+ | |||
+ | [[File:MMC_overview.png|center|link=]] | ||
+ | |||
+ | ===Component description=== | ||
+ | * 用户空间应用程序处理'''文件I / O'''管理以将卡存储器视为磁盘,而执行'''原始I / O'''访问的程序将存储器视为块设备。<ref>https://en.wikipedia.org/wiki/Device_file#Block_devices</ref>. | ||
+ | |||
+ | * '''VFS''' (内核空间) | ||
+ | 虚拟文件系统。 请参考VFS文档<ref>{{CodeSource | Linux kernel | Documentation/filesystems/vfs.txt | VFS}} </ref>. | ||
+ | |||
+ | * '''MMC core/SD/MMC/SDIO''' (内核空间) | ||
+ | '''MMC核心'''确保与MultiMediaCard('''MMC''')兼容。<ref>[https://www.jedec.org/standards-documents/technology-focus-areas/flash-memory-ssds-ufs-emmc/e-mmc MultiMediaCard], embedded MultiMediaCard specification</ref> /安全数字('''SD''') ('''SD''')<ref>[https://www.sdcard.org/ Secure Digital], secure digital specification</ref> /安全数字输入/输出('''SDIO''')<ref>[https://www.sdcard.org/ Secure Digital Input Output], Secure Digital Input Output specification</ref>. | ||
+ | |||
+ | * '''SDMMC driver''' (内核空间) / '''SDMMC''' (硬件) | ||
+ | '''SDMMC驱动程序'''处理: | ||
+ | * 寄存器,时钟,中断和IDMA控制。 | ||
+ | * 基于命令/响应和数据传输的总线上的通信。 | ||
+ | 请参阅[[SDMMC internal peripheral]]. | ||
+ | |||
+ | ===API description=== | ||
+ | MMC核心处理文件系统读/写调用。 | ||
+ | |||
+ | ==Configuration == | ||
+ | ===Kernel configuration=== | ||
+ | 在ST交付中,默认情况下会激活MMC框架。 如果需要特定的配置,则本节说明如何在内核中激活/禁用MMC框架。 | ||
+ | |||
+ | 可以通过Linux<sup>®</sup>Menuconfig工具在内核配置中激活MMC框架: [[Menuconfig or how to configure kernel]] | ||
+ | |||
+ | <pre> | ||
+ | [*] Device Drivers | ||
+ | [*] MMC/SD/SDIO card support | ||
+ | <*> HW reset support for eMMC | ||
+ | <*> Simple HW reset support for MMC | ||
+ | <*> MMC block device driver | ||
+ | (16) Number of minors per block device | ||
+ | ... | ||
+ | <*> ARM AMBA Multimedia Card Interface support | ||
+ | [*] STMicroelectronics STM32 SDMMC Controller | ||
+ | </pre> | ||
+ | |||
+ | ===Device tree configuration=== | ||
+ | 借助 [[STM32CubeMX]]可以完成DT配置。 | ||
+ | |||
+ | 请参考[[SDMMC_device_tree_configuration| SDMMC device tree configuration]]. | ||
+ | |||
+ | ==How to use the framework== | ||
+ | MMC框架可以使用处理读/写/擦除操作的文件系统。 请参考 [[How to support EXT4 through MMC|EXT4 support through MMC]]. | ||
+ | |||
+ | |||
+ | ==How to trace and debug the framework== | ||
+ | |||
+ | ===How to monitor=== | ||
+ | sysfs界面提供有关每个mmc设备的详细信息: | ||
+ | |||
+ | <pre> | ||
+ | root:~# cat /sys/kernel/debug/mmc0/ios | ||
+ | clock: 50000000 Hz | ||
+ | vdd: 21 (3.3 ~ 3.4 V) | ||
+ | bus mode: 2 (push-pull) | ||
+ | chip select: 0 (don't care) | ||
+ | power mode: 2 (on) | ||
+ | bus width: 2 (4 bits) | ||
+ | timing spec: 2 (sd high-speed) | ||
+ | signal voltage: 0 (3.30 V) | ||
+ | driver type: 0 (driver type B) | ||
+ | </pre> | ||
+ | |||
+ | ===How to trace=== | ||
+ | 有关动态跟踪用法的详细信息,请参阅 [[How to use the kernel dynamic debug]]. | ||
+ | |||
+ | root:~# echo "file drivers/mmc/* +p" > /sys/kernel/debug/dynamic_debug/control | ||
+ | |||
+ | ==Source code location== | ||
+ | MMC框架可用 {{CodeSource | Linux kernel | drivers/mmc | here}}. | ||
+ | |||
+ | ==References== | ||
+ | 请参考以下链接以获得MMC框架的完整说明: | ||
+ | |||
+ | <references /> |
2020年11月10日 (二) 11:02的最新版本
SUMMARY
MMC(MultiMediaCard)/ SD(安全数字)/ SDIO(安全数字输入/输出)子系统实现了标准的Linux ®</ sup>主机驱动程序,可与MMC / SD存储卡或SDIO卡接口。
目录
System overview
Component description
- 用户空间应用程序处理文件I / O管理以将卡存储器视为磁盘,而执行原始I / O访问的程序将存储器视为块设备。[1].
- VFS (内核空间)
虚拟文件系统。 请参考VFS文档[2].
- MMC core/SD/MMC/SDIO (内核空间)
MMC核心确保与MultiMediaCard(MMC)兼容。[3] /安全数字(SD) (SD)[4] /安全数字输入/输出(SDIO)[5].
- SDMMC driver (内核空间) / SDMMC (硬件)
SDMMC驱动程序处理:
- 寄存器,时钟,中断和IDMA控制。
- 基于命令/响应和数据传输的总线上的通信。
API description
MMC核心处理文件系统读/写调用。
Configuration
Kernel configuration
在ST交付中,默认情况下会激活MMC框架。 如果需要特定的配置,则本节说明如何在内核中激活/禁用MMC框架。
可以通过Linux®Menuconfig工具在内核配置中激活MMC框架: Menuconfig or how to configure kernel
[*] Device Drivers [*] MMC/SD/SDIO card support <*> HW reset support for eMMC <*> Simple HW reset support for MMC <*> MMC block device driver (16) Number of minors per block device ... <*> ARM AMBA Multimedia Card Interface support [*] STMicroelectronics STM32 SDMMC Controller
How to trace and debug the framework
How to monitor
sysfs界面提供有关每个mmc设备的详细信息:
root:~# cat /sys/kernel/debug/mmc0/ios clock: 50000000 Hz vdd: 21 (3.3 ~ 3.4 V) bus mode: 2 (push-pull) chip select: 0 (don't care) power mode: 2 (on) bus width: 2 (4 bits) timing spec: 2 (sd high-speed) signal voltage: 0 (3.30 V) driver type: 0 (driver type B)
How to trace
有关动态跟踪用法的详细信息,请参阅 How to use the kernel dynamic debug.
root:~# echo "file drivers/mmc/* +p" > /sys/kernel/debug/dynamic_debug/control
Source code location
MMC框架可用 drivers/mmc | |}} here .
References
请参考以下链接以获得MMC框架的完整说明:
- ↑ https://en.wikipedia.org/wiki/Device_file#Block_devices
- ↑ Documentation/filesystems/vfs.txt | |}} VFS
- ↑ MultiMediaCard, embedded MultiMediaCard specification
- ↑ Secure Digital, secure digital specification
- ↑ Secure Digital Input Output, Secure Digital Input Output specification