mmc_test.c研究mmc模块使用方法
2016-06-08 13:56
519 查看
mmc_test.c研究mmc模块使用方法
1. make menuconfig --> Kernel hacking --> 选中Debug Filesystem (CONFIG_DEBUG_FS)选项。
CONFIG_MMC_DEBUG=y
CONFIG_MMC_TEST=y
vi drivers/mmc/card/mmc_test.c
fs_initcall(mmc_test_init);
//module_init(mmc_test_init);
2.mount -t debugfs none /sys/kernel/debug
3./sys/kernel/debug/mmc0/mmc0:aaaa# ls
state status test testlist
4.cat testlist
1: Basic write (no data verification)
2: Basic read (no data verification)
3: Basic write (with data verification)
4: Basic read (with data verification)
5: Multi-block write
6: Multi-block read
7: Power of two block writes
8: Power of two block reads
9: Weird sized block writes
10: Weird sized block reads
11: Badly aligned write
12: Badly aligned read
13: Badly aligned multi-block write
14: Badly aligned multi-block read
15: Correct xfer_size at write (start failure)
16: Correct xfer_size at read (start failure)
17: Correct xfer_size at write (midway failure)
18: Correct xfer_size at read (midway failure)
19: Highmem write
20: Highmem read
21: Multi-block highmem write
22: Multi-block highmem read
23: Best-case read performance
24: Best-case write performance
25: Best-case read performance into scattered pages
26: Best-case write performance from scattered pages
27: Single read performance by transfer size
28: Single write performance by transfer size
29: Single trim performance by transfer size
30: Consecutive read performance by transfer size
31: Consecutive write performance by transfer size
32: Consecutive trim performance by transfer size
33: Random read performance by transfer size
34: Random write performance by transfer size
35: Large sequential read into scattered pages
36: Large sequential write from scattered pages
37: Write performance with blocking req 4k to 4MB
38: Write performance with non-blocking req 4k to 4MB
39: Read performance with blocking req 4k to 4MB
40: Read performance with non-blocking req 4k to 4MB
41: Write performance blocking req 1 to 512 sg elems
42: Write performance non-blocking req 1 to 512 sg elems
43: Read performance blocking req 1 to 512 sg elems
44: Read performance non-blocking req 1 to 512 sg elems
45: eMMC hardware reset
5.echo 2 > test
[ 1599.710000] mmc0: Starting tests of card mmc0:aaaa...
[ 1599.720000] mmc0: Test case 2. Basic read (no data verification)...
[ 1599.730000] mmc0: Result: OK
[ 1599.740000] mmc0: Tests completed.
1. make menuconfig --> Kernel hacking --> 选中Debug Filesystem (CONFIG_DEBUG_FS)选项。
CONFIG_MMC_DEBUG=y
CONFIG_MMC_TEST=y
vi drivers/mmc/card/mmc_test.c
fs_initcall(mmc_test_init);
//module_init(mmc_test_init);
2.mount -t debugfs none /sys/kernel/debug
3./sys/kernel/debug/mmc0/mmc0:aaaa# ls
state status test testlist
4.cat testlist
1: Basic write (no data verification)
2: Basic read (no data verification)
3: Basic write (with data verification)
4: Basic read (with data verification)
5: Multi-block write
6: Multi-block read
7: Power of two block writes
8: Power of two block reads
9: Weird sized block writes
10: Weird sized block reads
11: Badly aligned write
12: Badly aligned read
13: Badly aligned multi-block write
14: Badly aligned multi-block read
15: Correct xfer_size at write (start failure)
16: Correct xfer_size at read (start failure)
17: Correct xfer_size at write (midway failure)
18: Correct xfer_size at read (midway failure)
19: Highmem write
20: Highmem read
21: Multi-block highmem write
22: Multi-block highmem read
23: Best-case read performance
24: Best-case write performance
25: Best-case read performance into scattered pages
26: Best-case write performance from scattered pages
27: Single read performance by transfer size
28: Single write performance by transfer size
29: Single trim performance by transfer size
30: Consecutive read performance by transfer size
31: Consecutive write performance by transfer size
32: Consecutive trim performance by transfer size
33: Random read performance by transfer size
34: Random write performance by transfer size
35: Large sequential read into scattered pages
36: Large sequential write from scattered pages
37: Write performance with blocking req 4k to 4MB
38: Write performance with non-blocking req 4k to 4MB
39: Read performance with blocking req 4k to 4MB
40: Read performance with non-blocking req 4k to 4MB
41: Write performance blocking req 1 to 512 sg elems
42: Write performance non-blocking req 1 to 512 sg elems
43: Read performance blocking req 1 to 512 sg elems
44: Read performance non-blocking req 1 to 512 sg elems
45: eMMC hardware reset
5.echo 2 > test
[ 1599.710000] mmc0: Starting tests of card mmc0:aaaa...
[ 1599.720000] mmc0: Test case 2. Basic read (no data verification)...
[ 1599.730000] mmc0: Result: OK
[ 1599.740000] mmc0: Tests completed.
相关文章推荐
- 字符串结尾‘0’和‘\0’的区别
- PHPCMS V9 全站 Sitemaps生成实现代码[服务器端版]
- Android只GLSurfaceView画立方体测试代码
- 【Java集合源码剖析】ArrayList源码剖析
- 使用Jsoup解析html网页
- 如何查看表和索引的统计信息
- 导入数据到hive外部表
- 位运算
- ADT下载地址(含各版本),最新ADT-23.0.6
- 分享pdf表格转换成excel的转换方法
- java后台调用HttpURLConnection类模拟浏览器请求实例
- Android Java层的hook检测(Cydia Substrate或者Xposed框架)
- UIBezierPath 使用
- iOS8 Size Classes的理解与使用
- lamp+nginx代理+discuz+wordpress+phpmyadmin
- 继承 SurfaceView 无法调用到onDraw()的解决方法
- Git版本控制策略
- AT SELECTION-SCREEN OUTPUT 用法实例
- VBOX启动错误-Kernel driver not installed (rc=-1908)
- shell编程学习笔记【原创】