From: Minkyu Kang Date: Thu, 20 May 2010 00:34:49 +0000 (+0900) Subject: usbd: Erase the qboot also when write ubi image X-Git-Tag: JE02_20100520~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=365bb2230b9238147d30a14536a330ae98f6a910;p=kernel%2Fu-boot.git usbd: Erase the qboot also when write ubi image Signed-off-by: Minkyu Kang --- diff --git a/common/cmd_usbd.c b/common/cmd_usbd.c index ead999b..bfe34c6 100644 --- a/common/cmd_usbd.c +++ b/common/cmd_usbd.c @@ -947,6 +947,17 @@ static int process_data(struct usbd_ops *usbd) /* File Systems */ case IMG_FILESYSTEM: + /* Erase the qboot also when write ubi image */ + { + int qboot_id; + qboot_id = get_part_id("qboot"); + + if (qboot_id != -1) { + sprintf(offset, "%x", parts[qboot_id]->offset); + sprintf(length, "%x", parts[qboot_id]->size); + nand_cmd(0, offset, length, NULL); + } + } ret = write_file_system(ramaddr, len, offset, length, part_id, ubi_update); break;