“MMC overview”的版本间的差异

来自百问网嵌入式Linux wiki
 
第1行: 第1行:
 
'''SUMMARY '''<br>
 
'''SUMMARY '''<br>
The MMC (MultiMediaCard) / SD (secure digital) / SDIO (secure digital input/output) subsystem implements a standard Linux<sup>&reg;</sup> host driver to interface with MMC / SD memory cards or SDIO cards.
+
MMC(MultiMediaCard)/ SD(安全数字)/ SDIO(安全数字输入/输出)子系统实现了标准的Linux <sup>&reg;</ sup>主机驱动程序,可与MMC / SD存储卡或SDIO卡接口。
  
 
== Framework purpose ==
 
== Framework purpose ==
The purpose of this article is to introduce the MMC Linux<sup>&reg;</sup> subsystem (MMC / SD) by:
+
本文的目的是通过以下方式介绍MMC Linux<sup>&reg;</sup>子系统(MMC/SD)
* providing general information
+
* 提供一般信息
* describing the main components/stakeholders
+
* 描述主要组成部分/利益相关者
 
+
SDIO在[[WLAN_overview|WLAN overview]]中解决。
The SDIO is addressed in the [[WLAN_overview|WLAN overview]].
 
  
 
==System overview==
 
==System overview==
第14行: 第13行:
  
 
===Component description===
 
===Component description===
* User space applications handle '''file I/O''' management to view the card memory as a disk, whereas programs that perform '''raw I/O''' accesses see the memory as a block device<ref>https://en.wikipedia.org/wiki/Device_file#Block_devices</ref>.
+
* 用户空间应用程序处理'''文件I / O'''管理以将卡存储器视为磁盘,而执行'''原始I / O'''访问的程序将存储器视为块设备。<ref>https://en.wikipedia.org/wiki/Device_file#Block_devices</ref>.
  
* '''VFS''' (Kernel space)
+
* '''VFS''' (内核空间)
Virtual File System. Please refer to the VFS documentation <ref>{{CodeSource | Linux kernel | Documentation/filesystems/vfs.txt | VFS}} </ref>.
+
虚拟文件系统。 请参考VFS文档<ref>{{CodeSource | Linux kernel | Documentation/filesystems/vfs.txt | VFS}} </ref>.
  
* '''MMC core/SD/MMC/SDIO''' (Kernel space)
+
* '''MMC core/SD/MMC/SDIO''' (内核空间)
The '''MMC core''' ensures compliance with MultiMediaCard ('''MMC''')<ref>[https://www.jedec.org/standards-documents/technology-focus-areas/flash-memory-ssds-ufs-emmc/e-mmc MultiMediaCard], embedded MultiMediaCard specification</ref> / secure digital ('''SD''')<ref>[https://www.sdcard.org/ Secure Digital], secure digital specification</ref> / secure digital input/output ('''SDIO''')<ref>[https://www.sdcard.org/ Secure Digital Input Output], Secure Digital Input Output specification</ref>.
+
'''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''' (Kernel space) / '''SDMMC''' (hardware)  
+
* '''SDMMC driver''' (内核空间) / '''SDMMC''' (硬件)  
The '''SDMMC driver''' handles:
+
'''SDMMC驱动程序'''处理:
* the registers, the clock, the interrupt and the IDMA control.
+
* 寄存器,时钟,中断和IDMA控制。
* the communications over the bus based on command/response and data transfers.
+
* 基于命令/响应和数据传输的总线上的通信。
Please refer to the [[SDMMC internal peripheral]].
+
请参阅[[SDMMC internal peripheral]].
  
 
===API description===
 
===API description===
The MMC core handles the file system read/write calls.
+
MMC核心处理文件系统读/写调用。
  
 
==Configuration ==
 
==Configuration ==
 
===Kernel configuration===
 
===Kernel configuration===
The MMC framework is activated by default in ST deliveries. If a specific configuration is needed, this section indicates how the MMC framework can be activated/inactivated in the kernel.
+
在ST交付中,默认情况下会激活MMC框架。 如果需要特定的配置,则本节说明如何在内核中激活/禁用MMC框架。
  
The MMC framework can be activated in the kernel configuration via Linux<sup>&reg;</sup> Menuconfig tool: [[Menuconfig or how to configure kernel]]
+
可以通过Linux<sup>&reg;</sup>Menuconfig工具在内核配置中激活MMC框架: [[Menuconfig or how to configure kernel]]
  
 
<pre>
 
<pre>
第50行: 第49行:
  
 
===Device tree configuration===
 
===Device tree configuration===
DT configuration can be done thanks to [[STM32CubeMX]].
+
借助 [[STM32CubeMX]]可以完成DT配置。
  
Please refer to the [[SDMMC_device_tree_configuration| SDMMC device tree configuration]].
+
请参考[[SDMMC_device_tree_configuration| SDMMC device tree configuration]].
  
 
==How to use the framework==
 
==How to use the framework==
A file system, which handles read/write/erase operations, can be used with the MMC framework. Please refer to the [[How to support EXT4 through MMC|EXT4 support through MMC]].
+
MMC框架可以使用处理读//擦除操作的文件系统。 请参考 [[How to support EXT4 through MMC|EXT4 support through MMC]].
  
  
第61行: 第60行:
  
 
===How to monitor===
 
===How to monitor===
The sysfs interface provides detailed information on each mmc device:
+
sysfs界面提供有关每个mmc设备的详细信息:
  
 
<pre>
 
<pre>
第77行: 第76行:
  
 
===How to trace===
 
===How to trace===
For details on dynamic trace usage, refer to [[How to use the kernel dynamic debug]].
+
有关动态跟踪用法的详细信息,请参阅 [[How to use the kernel dynamic debug]].
  
 
root:~# echo "file drivers/mmc/* +p" > /sys/kernel/debug/dynamic_debug/control
 
root:~# echo "file drivers/mmc/* +p" > /sys/kernel/debug/dynamic_debug/control
  
 
==Source code location==
 
==Source code location==
The MMC framework is available {{CodeSource | Linux kernel | drivers/mmc  | here}}.
+
MMC框架可用 {{CodeSource | Linux kernel | drivers/mmc  | here}}.
  
 
==References==
 
==References==
Please refer to the following links for a full description of the MMC framework:
+
请参考以下链接以获得MMC框架的完整说明:
  
 
<references />
 
<references />
 
<noinclude>
 
{{ArticleBasedOnModel | Framework overview article model}}
 
[[Category:Mass storage]]
 
</noinclude>
 

2020年11月10日 (二) 11:02的最新版本

SUMMARY
MMC(MultiMediaCard)/ SD(安全数字)/ SDIO(安全数字输入/输出)子系统实现了标准的Linux ®</ sup>主机驱动程序,可与MMC / SD存储卡或SDIO卡接口。

Framework purpose

本文的目的是通过以下方式介绍MMC Linux®子系统(MMC/SD):

  • 提供一般信息
  • 描述主要组成部分/利益相关者

SDIO在WLAN overview中解决。

System overview

MMC overview.png

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控制。
  • 基于命令/响应和数据传输的总线上的通信。

请参阅SDMMC internal peripheral.

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

Device tree configuration

借助 STM32CubeMX可以完成DT配置。

请参考 SDMMC device tree configuration.

How to use the framework

MMC框架可以使用处理读/写/擦除操作的文件系统。 请参考 EXT4 support through MMC.


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框架的完整说明:

  1. https://en.wikipedia.org/wiki/Device_file#Block_devices
  2. Documentation/filesystems/vfs.txt | |}} VFS
  3. MultiMediaCard, embedded MultiMediaCard specification
  4. Secure Digital, secure digital specification
  5. Secure Digital Input Output, Secure Digital Input Output specification