diff options
author | Che-Liang Chiou <clchiou@chromium.org> | 2011-06-22 21:01:04 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:39:33 -0700 |
commit | 7d18283c41f499c1317c7a5cd368981d410ea473 (patch) | |
tree | 2c17dcc37b0931e9c34659f1a5807afa39718341 /lib/chromeos/os_storage.c | |
parent | 014ac08f3a445ce623fff16d7073e4e1a82bf3a7 (diff) |
CHROMIUM: implement SD card probing function
BUG=chromium-os:16508
TEST=manual
1. unplug SD card and any other external storage media
2. boot to recovery mode
3. check that u-boot does not probe any external storage media
4. plug in SD card
5. check that u-boot probes the SD card
Change-Id: I00413485306ddecb3baf593a70230d2cd2f52bac
Reviewed-on: http://gerrit.chromium.org/gerrit/3079
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/chromeos/os_storage.c')
-rw-r--r-- | lib/chromeos/os_storage.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/chromeos/os_storage.c b/lib/chromeos/os_storage.c index 1bbd1cf8ac8..c410cd05949 100644 --- a/lib/chromeos/os_storage.c +++ b/lib/chromeos/os_storage.c @@ -203,7 +203,13 @@ int initialize_mmc_device(int dev) int is_mmc_storage_present(int mmc_device_number) { - return find_mmc_device(mmc_device_number) != NULL; + /* + * mmc_init tests the SD card's version and tries its operating + * condition. It should be the minimally required code for probing + * an SD card. + */ + struct mmc *mmc = find_mmc_device(mmc_device_number); + return mmc != NULL && mmc_init(mmc) == 0; } int is_usb_storage_present(void) |