diff options
author | Steve Rae <srae@broadcom.com> | 2016-06-07 11:19:35 -0700 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-06-27 16:36:33 -0400 |
commit | 64ece84854ae49f40e9b9d4d88502247774f9d2f (patch) | |
tree | 5d02749db9a0ef23a4bd25fb66badd054162f3f2 /drivers | |
parent | ac6e5fed31ccd1da18b8ef10542c3534bd2dbd38 (diff) | |
download | u-boot-imx-64ece84854ae49f40e9b9d4d88502247774f9d2f.zip u-boot-imx-64ece84854ae49f40e9b9d4d88502247774f9d2f.tar.gz u-boot-imx-64ece84854ae49f40e9b9d4d88502247774f9d2f.tar.bz2 |
fastboot: sparse: remove session-id logic
This "session-id" alogrithm is not required, and currently corrupts
the stored image whenever more the one "session" is required.
Signed-off-by: Steve Rae <srae@broadcom.com>
Diffstat (limited to 'drivers')
-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 28b244a..ddf989c 100644 --- a/drivers/usb/gadget/f_fastboot.c +++ b/drivers/usb/gadget/f_fastboot.c @@ -59,7 +59,6 @@ static inline struct f_fastboot *func_to_fastboot(struct usb_function *f) } static struct f_fastboot *fastboot_func; -static unsigned int fastboot_flash_session_id; static unsigned int download_size; static unsigned int download_bytes; @@ -424,15 +423,6 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req) sprintf(str_num, "0x%08x", CONFIG_FASTBOOT_BUF_SIZE); strncat(response, str_num, chars_left); - - /* - * This also indicates the start of a new flashing - * "session", in which we could have 1-N buffers to - * write to a partition. - * - * Reset our session counter. - */ - fastboot_flash_session_id = 0; } else if (!strcmp_l1("serialno", cmd)) { s = getenv("serial#"); if (s) @@ -600,16 +590,14 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req) strcpy(response, "FAILno flash device defined"); #ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV - fb_mmc_flash_write(cmd, fastboot_flash_session_id, - (void *)CONFIG_FASTBOOT_BUF_ADDR, + fb_mmc_flash_write(cmd, (void *)CONFIG_FASTBOOT_BUF_ADDR, download_bytes, response); #endif #ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV - fb_nand_flash_write(cmd, fastboot_flash_session_id, + fb_nand_flash_write(cmd, (void *)CONFIG_FASTBOOT_BUF_ADDR, download_bytes, response); #endif - fastboot_flash_session_id++; fastboot_tx_write_str(response); } #endif |