f_thor: Dont perform reset at the end of thor
PATCH 1/1 f_thor: Dont perform reset at the end of thor
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.
--- drivers/usb/gadget/f_thor.c | 7 +++++++ drivers/usb/gadget/f_thor.h | 3 +++ 2 files changed, 10 insertions(+), 0 deletions(-)
drivers/usb/gadget/f_thor.c +7 -0
@@ -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 :
@@ -726,6 +729,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 {
drivers/usb/gadget/f_thor.h +3 -0
@@ -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_ */
Signature · 1 line
1.7.4
PATCH 1/1 f_thor: Dont perform reset at the end of thor
Quoted 42 lines · Siva Durga Prasad Paladugu
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 <[email protected]>--- drivers/usb/gadget/f_thor.c | 7 +++++++ drivers/usb/gadget/f_thor.h | 3 +++ 2 files changed, 10 insertions(+), 0 deletions(-)drivers/usb/gadget/f_thor.c +7
-0@@ -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 :@@ -726,6 +729,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 {drivers/usb/gadget/f_thor.h +0
-0
drivers/usb/gadget/f_thor.h struct f_thor { · line 127
Quoted 7 lines
drivers/usb/gadget/f_thor.h +3
-0@@ -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_ */
It is reasonable config option not to reset the board after every download.
Thanks,
Michal
Signature · 14 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140924/8adb7fd3/attachment.pgp>
PATCH 1/1 f_thor: Dont perform reset at the end of thor
Hi Marek,
2014-09-24 14:33 GMT+02:00 Michal Simek <[email protected]>:
Quoted 53 lines · Siva Durga Prasad Paladugu
Quoted 42 lines
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 <[email protected]>--- drivers/usb/gadget/f_thor.c | 7 +++++++ drivers/usb/gadget/f_thor.h | 3 +++ 2 files changed, 10 insertions(+), 0 deletions(-)drivers/usb/gadget/f_thor.c +7
-0@@ -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 :@@ -726,6 +729,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 {drivers/usb/gadget/f_thor.h +0
-0drivers/usb/gadget/f_thor.h struct f_thor { · line 127
Quoted 7 lines
drivers/usb/gadget/f_thor.h +3
-0@@ -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_ */ Tested-by Michal Simek <[email protected]>
Quoted 6 lines
It is reasonable config option not to reset the board after every download.
Thanks,
Michal
Any comment on this one?
Thanks,
Michal
Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91 w: www.monstr.eu p: +42-0-721842854 Maintainer of Linux kernel - Microblaze cpu - http://www.monstr.eu/fdt/ Maintainer of Linux kernel - Xilinx Zynq ARM architecture Microblaze U-BOOT custodian and responsible for u-boot arm zynq platform