歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux編程 >> Linux編程

u-boot中mmc命令使用

[u-boot: v2013.01]

[Author: Bo Shen <[email protected]>]

mmc命令的幫助信息如下:

U-Boot> mmc

mmc - MMC sub system   Usage: mmc read addr blk# cnt mmc write addr blk# cnt mmc erase blk# cnt mmc rescan mmc part - lists available partition on current mmc device mmc dev [dev] [part] - show or set current mmc device [partition] mmc list - lists available devices

當系統啟動後,系統會將mci0設置為當前設備。使用mmcinfo就可以看到插入到mmc controller 0的sdcard信息。

U-Boot> mmcinfo

Device: mci Manufacturer ID: 3 OEM: 5344 Name: SD04G Tran Speed: 25000000 Rd Block Len: 512 SD version 2.0 High Capacity: Yes Capacity: 3.8 GiB Bus Width: 4-bit   如果SoC支持多個mmc controller並且使能,使用mmc list來查看使能了幾個, 可以通過mmc dev來查看當前是那個設備,或者通過mmc dev <NO.>來切換。 像我的系統支持兩個mmc controller. U-Boot> mmc list (顯示有幾個mmc controller) mci 0 mci 1 U-Boot> mmc dev (顯示當前是那個device) mmc1 is current device U-Boot> mmc dev 0 (設置0為當前設備) mmc0 is current device   如果,換sdcard,則使用mmc rescan來重新獲取sdcard信息 U-Boot> mmc rescan (重新scan當前設備) mci: setting clock 257812 Hz, block size 512 mci: setting clock 22000000 Hz, block size 512 mci: setting clock 257812 Hz, block size 512 gen_atmel_mci: CMDR 00001048 ( 8) ARGR 000001aa (SR: 0c100025) Command Failed mci: setting clock 257812 Hz, block size 512 mci: setting clock 22000000 Hz, block size 512 U-Boot> mmcinfo (列出當前設備的信息) Device: mci Manufacturer ID: 1 OEM: 5041 Name: SK512 Tran Speed: 25000000 Rd Block Len: 512 SD version 1.10 High Capacity: No Capacity: 472.5 MiB Bus Width: 4-bit
Copyright © Linux教程網 All Rights Reserved