]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
usb: gadget: f_thor: Dont perform reset at the end of thor
authorSiva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Mon, 8 Sep 2014 16:39:40 +0000 (22:09 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 10 Sep 2014 09:03:50 +0000 (11:03 +0200)
Dont perform reset at the end of thor download
if configured to do reset off.
Reset may not be required in all cases and hence
provided an option to do so.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/usb/gadget/f_thor.c
drivers/usb/gadget/f_thor.h
include/configs/zynq-common.h

index 76584127a8a4474af4e6ea3702e227083fd320eb..e5dcb30aaea22abe9f0e48f3cf372ed5347d7e9e 100644 (file)
@@ -123,6 +123,9 @@ static int process_rqt_cmd(const struct rqt_box *rqt)
                send_rsp(rsp);
                g_dnl_unregister();
                dfu_free_entities();
+#ifdef CONFIG_THOR_RESET_OFF
+               return RESET_DONE;
+#endif
                run_command("reset", 0);
                break;
        case RQT_CMD_POWEROFF:
@@ -725,6 +728,10 @@ int thor_handle(void)
 
                if (ret > 0) {
                        ret = process_data();
+#ifdef CONFIG_THOR_RESET_OFF
+                       if (ret == RESET_DONE)
+                               break;
+#endif
                        if (ret < 0)
                                return ret;
                } else {
index 833a9d24ae7e632ba18173738491b5c6f65a1650..83412851dd17f6100f7c2eda67b0e30e8b69958d 100644 (file)
@@ -121,4 +121,7 @@ struct f_thor {
 #define F_NAME_BUF_SIZE 32
 #define THOR_PACKET_SIZE SZ_1M      /* 1 MiB */
 #define THOR_STORE_UNIT_SIZE SZ_32M /* 32 MiB */
+#ifdef CONFIG_THOR_RESET_OFF
+#define RESET_DONE 0xFFFFFFFF
+#endif
 #endif /* _USB_THOR_H_ */
index 402fc45fb1810cfaa5f7f970d1b8b28d334f3c73..b1d0ae5067998ff6f2806810c35cbf930d844cd1 100644 (file)
 # define CONFIG_CMD_DFU
 # define CONFIG_CMD_THOR_DOWNLOAD
 # define CONFIG_THOR_FUNCTION
+# define CONFIG_THOR_RESET_OFF
 # define DFU_ALT_INFO_RAM \
        "dfu_ram_info=" \
        "set dfu_alt_info " \