diff options
author | Wolfgang Denk <wd@denx.de> | 2009-06-04 10:56:09 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-06-04 10:56:09 +0200 |
commit | 3bc8556f9b24af60dba2b55a0abb1182dff45ecc (patch) | |
tree | a6333aa494f842120c69724386b3823affd177e7 /common/cmd_mmc.c | |
parent | dfcd7f21607fd847236b04bb1a8d59a7c10ab99c (diff) | |
parent | 4e3d89ba948eef801ffd46ef862cdede5b3f8320 (diff) | |
download | u-boot-imx-3bc8556f9b24af60dba2b55a0abb1182dff45ecc.zip u-boot-imx-3bc8556f9b24af60dba2b55a0abb1182dff45ecc.tar.gz u-boot-imx-3bc8556f9b24af60dba2b55a0abb1182dff45ecc.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-mmc
Diffstat (limited to 'common/cmd_mmc.c')
-rw-r--r-- | common/cmd_mmc.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/common/cmd_mmc.c b/common/cmd_mmc.c index f1fa32f..039fe59 100644 --- a/common/cmd_mmc.c +++ b/common/cmd_mmc.c @@ -135,8 +135,9 @@ int do_mmcinfo (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } -U_BOOT_CMD(mmcinfo, 2, 0, do_mmcinfo, "mmcinfo <dev num>-- display MMC info\n", - NULL); +U_BOOT_CMD(mmcinfo, 2, 0, do_mmcinfo, + "print MMC information", + "<dev num>\n"); int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { @@ -148,6 +149,9 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) int dev = simple_strtoul(argv[2], NULL, 10); struct mmc *mmc = find_mmc_device(dev); + if (!mmc) + return 1; + mmc_init(mmc); return 0; @@ -174,6 +178,9 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) u32 blk = simple_strtoul(argv[4], NULL, 16); struct mmc *mmc = find_mmc_device(dev); + if (!mmc) + return 1; + printf("\nMMC read: dev # %d, block # %d, count %d ... ", dev, blk, cnt); @@ -196,6 +203,9 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) int blk = simple_strtoul(argv[4], NULL, 16); + if (!mmc) + return 1; + printf("\nMMC write: dev # %d, block # %d, count %d ... ", dev, blk, cnt); @@ -218,8 +228,8 @@ int do_mmcops(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) U_BOOT_CMD( mmc, 6, 1, do_mmcops, "MMC sub system", - "mmc read <device num> addr blk# cnt\n" + "read <device num> addr blk# cnt\n" "mmc write <device num> addr blk# cnt\n" "mmc rescan <device num>\n" - "mmc list - lists available devices\n"); + "mmc list - list available devices\n"); #endif |