summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Nelson <eric.nelson@boundarydevices.com>2014-09-30 12:05:40 -0700
committerMarek Vasut <marex@denx.de>2014-10-06 14:50:44 +0200
commitc674a6660e9934cf332bb007726997b1c3686bf1 (patch)
treebce40bb1d431f60a0d5d5e81acd68e77d6987601
parente206799370f77097a29577599960b7f123f61b8c (diff)
downloadu-boot-imx-c674a6660e9934cf332bb007726997b1c3686bf1.zip
u-boot-imx-c674a6660e9934cf332bb007726997b1c3686bf1.tar.gz
u-boot-imx-c674a6660e9934cf332bb007726997b1c3686bf1.tar.bz2
usb: gadget: fastboot: add max-download-size variable
Current Android Fastboot seems to use 'max-download-size' instead of 'downloadsize' variable to indicate the maximum size of sparse segments. See function get_target_sparse_limit() in file fastboot/fastboot.c in the AOSP: https://android.googlesource.com/platform/system/core/+/master Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
-rw-r--r--drivers/usb/gadget/f_fastboot.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 9d15f63..3e1c0a9 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -351,7 +351,8 @@ static void cb_getvar(struct usb_ep *ep, struct usb_request *req)
strncat(response, FASTBOOT_VERSION, chars_left);
} else if (!strcmp_l1("bootloader-version", cmd)) {
strncat(response, U_BOOT_VERSION, chars_left);
- } else if (!strcmp_l1("downloadsize", cmd)) {
+ } else if (!strcmp_l1("downloadsize", cmd) ||
+ !strcmp_l1("max-download-size", cmd)) {
char str_num[12];
sprintf(str_num, "%08x", CONFIG_USB_FASTBOOT_BUF_SIZE);