projects
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e37a37f
)
usbd: Add modem ubi image checking
author
Joonyoung Shim
<jy0922.shim@samsung.com>
Tue, 12 Oct 2010 10:20:39 +0000
(19:20 +0900)
committer
Joonyoung Shim
<jy0922.shim@samsung.com>
Tue, 12 Oct 2010 10:29:21 +0000
(19:29 +0900)
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
common/cmd_usbd.c
patch
|
blob
|
history
diff --git
a/common/cmd_usbd.c
b/common/cmd_usbd.c
index
16fb02c
..
945717e
100644
(file)
--- a/
common/cmd_usbd.c
+++ b/
common/cmd_usbd.c
@@
-1108,6
+1108,14
@@
static int process_data(struct usbd_ops *usbd)
sprintf(offset, "%x", parts[part_id]->offset);
sprintf(length, "%x", parts[part_id]->size);
+ /* Check ubi image, 0x23494255 is UBI# */
+ {
+ long *img_header = (long *)down_ram_addr;
+
+ if (*img_header == 0x23494255)
+ goto ubi_img;
+ }
+
/* Erase */
if (!arg)
nand_cmd(0, offset, length, NULL);
@@
-1164,6
+1172,8
@@
static int process_data(struct usbd_ops *usbd)
len = (unsigned int) ubi_dest_size;
#endif
+
+ubi_img:
/* Write : arg (0 Modem) / (1 CSA) */
if (!arg) {
sprintf(length, "%x", (unsigned int) len);