diff options
Diffstat (limited to 'drivers/usb/gadget/f_fastboot.c')
-rw-r--r-- | drivers/usb/gadget/f_fastboot.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c index 1c9ecb7ecd..f6f3c3b326 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c | |||
@@ -61,7 +61,6 @@ static inline struct f_fastboot *func_to_fastboot(struct usb_function *f) | |||
61 | } | 61 | } |
62 | 62 | ||
63 | static struct f_fastboot *fastboot_func; | 63 | static struct f_fastboot *fastboot_func; |
64 | static unsigned int fastboot_flash_session_id; | ||
65 | static unsigned int download_size; | 64 | static unsigned int download_size; |
66 | static unsigned int download_bytes; | 65 | static unsigned int download_bytes; |
67 | static char f_cmdbuf[MAX_CMDS][32]; | 66 | static char f_cmdbuf[MAX_CMDS][32]; |
@@ -452,15 +451,6 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req) | |||
452 | 451 | ||
453 | sprintf(str_num, "0x%08x", CONFIG_FASTBOOT_BUF_SIZE); | 452 | sprintf(str_num, "0x%08x", CONFIG_FASTBOOT_BUF_SIZE); |
454 | strncat(response, str_num, chars_left); | 453 | strncat(response, str_num, chars_left); |
455 | |||
456 | /* | ||
457 | * This also indicates the start of a new flashing | ||
458 | * "session", in which we could have 1-N buffers to | ||
459 | * write to a partition. | ||
460 | * | ||
461 | * Reset our session counter. | ||
462 | */ | ||
463 | fastboot_flash_session_id = 0; | ||
464 | } else if (!strcmp_l1("serialno", cmd)) { | 454 | } else if (!strcmp_l1("serialno", cmd)) { |
465 | s = getenv("serial#"); | 455 | s = getenv("serial#"); |
466 | if (s) | 456 | if (s) |
@@ -804,16 +794,14 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req) | |||
804 | } | 794 | } |
805 | 795 | ||
806 | #ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV | 796 | #ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV |
807 | fb_mmc_flash_write(cmd, fastboot_flash_session_id, | 797 | fb_mmc_flash_write(cmd, (void *)CONFIG_FASTBOOT_BUF_ADDR, |
808 | (void *)CONFIG_FASTBOOT_BUF_ADDR, | ||
809 | download_bytes, response); | 798 | download_bytes, response); |
810 | #endif | 799 | #endif |
811 | #ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV | 800 | #ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV |
812 | fb_nand_flash_write(cmd, fastboot_flash_session_id, | 801 | fb_nand_flash_write(cmd, |
813 | (void *)CONFIG_FASTBOOT_BUF_ADDR, | 802 | (void *)CONFIG_FASTBOOT_BUF_ADDR, |
814 | download_bytes, response); | 803 | download_bytes, response); |
815 | #endif | 804 | #endif |
816 | fastboot_flash_session_id++; | ||
817 | fastboot_tx_write_str(response); | 805 | fastboot_tx_write_str(response); |
818 | } | 806 | } |
819 | #endif | 807 | #endif |