diff options
author | Tom Rini <trini@konsulko.com> | 2018-12-15 17:49:49 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-12-15 17:49:57 -0500 |
commit | 401c2540445aad08816382c0dc208d2516d90d89 (patch) | |
tree | 89c26f23edfb8da3d7a517d07fedd61fa5faf769 /drivers/usb/gadget/f_sdp.c | |
parent | 0dc526d98eb216003ea884739abc17f6eb05c0df (diff) | |
parent | 46a3f276549f3e5720b6e80278cda354c7fa859f (diff) |
Merge branch 'master' of git://git.denx.de/u-boot-usb
- Second half of the USB Gadget DM conversion
Diffstat (limited to 'drivers/usb/gadget/f_sdp.c')
-rw-r--r-- | drivers/usb/gadget/f_sdp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c index 00a9f88a41..ae97ab2b49 100644 --- a/drivers/usb/gadget/f_sdp.c +++ b/drivers/usb/gadget/f_sdp.c @@ -100,6 +100,7 @@ struct f_sdp { enum sdp_state state; enum sdp_state next_state; u32 dnl_address; + u32 dnl_bytes; u32 dnl_bytes_remaining; u32 jmp_address; bool always_send_status; @@ -276,6 +277,7 @@ static void sdp_rx_command_complete(struct usb_ep *ep, struct usb_request *req) sdp->state = SDP_STATE_RX_FILE_DATA; sdp->dnl_address = be32_to_cpu(cmd->addr); sdp->dnl_bytes_remaining = be32_to_cpu(cmd->cnt); + sdp->dnl_bytes = sdp->dnl_bytes_remaining; sdp->next_state = SDP_STATE_IDLE; printf("Downloading file of size %d to 0x%08x... ", @@ -355,6 +357,9 @@ static void sdp_rx_data_complete(struct usb_ep *ep, struct usb_request *req) if (sdp->dnl_bytes_remaining) return; +#ifndef CONFIG_SPL_BUILD + env_set_hex("filesize", sdp->dnl_bytes); +#endif printf("done\n"); switch (sdp->state) { |