cmd: net: Support BLK_MTD_CONT_WRITE
Change-Id: I6127e05418228fef4b269101eb3b202f52af89d2 Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
This commit is contained in:
parent
26dba18e91
commit
3511cb80a0
|
|
@ -128,7 +128,11 @@ int do_tftpflash(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
||||||
printf("## TFTP flash %s to partititon '%s' size 0x%lx ... ",
|
printf("## TFTP flash %s to partititon '%s' size 0x%lx ... ",
|
||||||
argv[2], part_name, filesize);
|
argv[2], part_name, filesize);
|
||||||
|
|
||||||
|
if (dev_desc->if_type == IF_TYPE_MTD)
|
||||||
|
dev_desc->op_flag |= BLK_MTD_CONT_WRITE;
|
||||||
ret = blk_dwrite(dev_desc, part.start, blknum, (void *)fileaddr);
|
ret = blk_dwrite(dev_desc, part.start, blknum, (void *)fileaddr);
|
||||||
|
if (dev_desc->if_type == IF_TYPE_MTD)
|
||||||
|
dev_desc->op_flag &= ~(BLK_MTD_CONT_WRITE);
|
||||||
if (ret != blknum)
|
if (ret != blknum)
|
||||||
printf("Failed(%d)\n", ret);
|
printf("Failed(%d)\n", ret);
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue