From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [U-Boot] [UBOOT PATCH] f_thor: Dont perform reset at the end of thor
Date: Wed, 24 Sep 2014 14:33:56 +0200 [thread overview]
Message-ID: <5422BA34.2070607@monstr.eu> (raw)
In-Reply-To: <fcbd26f2-d66c-44c4-9bae-4900dec31286@BN1AFFO11FD052.protection.gbl>
On 09/05/2014 09:01 AM, Siva Durga Prasad Paladugu wrote:
> 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>
> ---
> drivers/usb/gadget/f_thor.c | 7 +++++++
> drivers/usb/gadget/f_thor.h | 3 +++
> 2 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c
> index c85b0fb..8cf0718 100644
> --- a/drivers/usb/gadget/f_thor.c
> +++ b/drivers/usb/gadget/f_thor.c
> @@ -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 {
> diff --git a/drivers/usb/gadget/f_thor.h b/drivers/usb/gadget/f_thor.h
> index 833a9d2..8341285 100644
> --- a/drivers/usb/gadget/f_thor.h
> +++ b/drivers/usb/gadget/f_thor.h
> @@ -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 <monstr@monstr.eu>
It is reasonable config option not to reset the board after every download.
Thanks,
Michal
--
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>
next prev parent reply other threads:[~2014-09-24 12:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-05 7:01 [U-Boot] [UBOOT PATCH] f_thor: Dont perform reset at the end of thor Siva Durga Prasad Paladugu
2014-09-24 12:33 ` Michal Simek [this message]
2015-04-15 11:02 ` Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5422BA34.2070607@monstr.eu \
--to=monstr@monstr.eu \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox