@ -308,8 +308,7 @@ static int do_mmc_read(cmd_tbl_t *cmdtp, int flag,
return ( n = = cnt ) ? CMD_RET_SUCCESS : CMD_RET_FAILURE ;
return ( n = = cnt ) ? CMD_RET_SUCCESS : CMD_RET_FAILURE ;
}
}
# if CONFIG_IS_ENABLED(MMC_WRITE)
# if CONFIG_IS_ENABLED(CMD_MMC_SWRITE)
# if defined(CONFIG_FASTBOOT_FLASH)
static lbaint_t mmc_sparse_write ( struct sparse_storage * info , lbaint_t blk ,
static lbaint_t mmc_sparse_write ( struct sparse_storage * info , lbaint_t blk ,
lbaint_t blkcnt , const void * buffer )
lbaint_t blkcnt , const void * buffer )
{
{
@ -374,6 +373,7 @@ static int do_mmc_sparse_write(cmd_tbl_t *cmdtp, int flag,
}
}
# endif
# endif
# if CONFIG_IS_ENABLED(MMC_WRITE)
static int do_mmc_write ( cmd_tbl_t * cmdtp , int flag ,
static int do_mmc_write ( cmd_tbl_t * cmdtp , int flag ,
int argc , char * const argv [ ] )
int argc , char * const argv [ ] )
{
{
@ -868,11 +868,11 @@ static cmd_tbl_t cmd_mmc[] = {
U_BOOT_CMD_MKENT ( read , 4 , 1 , do_mmc_read , " " , " " ) ,
U_BOOT_CMD_MKENT ( read , 4 , 1 , do_mmc_read , " " , " " ) ,
# if CONFIG_IS_ENABLED(MMC_WRITE)
# if CONFIG_IS_ENABLED(MMC_WRITE)
U_BOOT_CMD_MKENT ( write , 4 , 0 , do_mmc_write , " " , " " ) ,
U_BOOT_CMD_MKENT ( write , 4 , 0 , do_mmc_write , " " , " " ) ,
# if defined(CONFIG_FASTBOOT_FLASH)
U_BOOT_CMD_MKENT ( swrite , 3 , 0 , do_mmc_sparse_write , " " , " " ) ,
# endif
U_BOOT_CMD_MKENT ( erase , 3 , 0 , do_mmc_erase , " " , " " ) ,
U_BOOT_CMD_MKENT ( erase , 3 , 0 , do_mmc_erase , " " , " " ) ,
# endif
# endif
# if CONFIG_IS_ENABLED(CMD_MMC_SWRITE)
U_BOOT_CMD_MKENT ( swrite , 3 , 0 , do_mmc_sparse_write , " " , " " ) ,
# endif
U_BOOT_CMD_MKENT ( rescan , 1 , 1 , do_mmc_rescan , " " , " " ) ,
U_BOOT_CMD_MKENT ( rescan , 1 , 1 , do_mmc_rescan , " " , " " ) ,
U_BOOT_CMD_MKENT ( part , 1 , 1 , do_mmc_part , " " , " " ) ,
U_BOOT_CMD_MKENT ( part , 1 , 1 , do_mmc_part , " " , " " ) ,
U_BOOT_CMD_MKENT ( dev , 3 , 0 , do_mmc_dev , " " , " " ) ,
U_BOOT_CMD_MKENT ( dev , 3 , 0 , do_mmc_dev , " " , " " ) ,
@ -927,7 +927,7 @@ U_BOOT_CMD(
" info - display info of the current MMC device \n "
" info - display info of the current MMC device \n "
" mmc read addr blk# cnt \n "
" mmc read addr blk# cnt \n "
" mmc write addr blk# cnt \n "
" mmc write addr blk# cnt \n "
# if defined(CONFIG_FASTBOOT_FLASH )
# if CONFIG_IS_ENABLED(CMD_MMC_SWRITE )
" mmc swrite addr blk# \n "
" mmc swrite addr blk# \n "
# endif
# endif
" mmc erase blk# cnt \n "
" mmc erase blk# cnt \n "