All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Majewski <lukma@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-boot][SDP] Trigger watchdog before calling usb_gadget_handle_interrupts
Date: Thu, 26 Oct 2017 13:25:41 +0200	[thread overview]
Message-ID: <20171026132541.2d620e24@jawa> (raw)
In-Reply-To: <1508750195-15855-2-git-send-email-vincent.prince.fr@gmail.com>

Hi Vincent,

> This prevents board resets when calling sdp command on boards which
> have a watchdog.
> 
> Signed-off-by: Vincent Prince <vincent.prince.fr@gmail.com>
> ---
>  drivers/usb/gadget/f_sdp.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/usb/gadget/f_sdp.c b/drivers/usb/gadget/f_sdp.c
> index 0fae66b..c3eba6d 100644
> --- a/drivers/usb/gadget/f_sdp.c
> +++ b/drivers/usb/gadget/f_sdp.c
> @@ -32,6 +32,7 @@
>  #include <spl.h>
>  #include <image.h>
>  #include <imximage.h>
> +#include <watchdog.h>
>  
>  #define HID_REPORT_ID_MASK	0x000000ff
>  
> @@ -602,6 +603,8 @@ int sdp_init(int controller_index)
>  			puts("\rCTRL+C - Operation aborted.\n");
>  			return 1;
>  		}
> +
> +		WATCHDOG_RESET();
>  		usb_gadget_handle_interrupts(controller_index);
>  	}
>  
> @@ -712,6 +715,7 @@ void sdp_handle(int controller_index)
>  			return;
>  		}
>  
> +		WATCHDOG_RESET();
>  		usb_gadget_handle_interrupts(controller_index);
>  
>  		sdp_handle_in_ep();

Reviewed-by: Lukasz Majewski <lukma@denx.de>


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de

  reply	other threads:[~2017-10-26 11:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-23  9:16 [U-Boot] [U-boot][SDP] Trigger watchdog before calling usb_gadget_handle_interrupts Vincent Prince
2017-10-23  9:16 ` Vincent Prince
2017-10-26 11:25   ` Lukasz Majewski [this message]
2017-10-26 11:52     ` Stefan Agner
2017-11-07 13:26       ` Vincent Prince
2017-11-07 14:36         ` Fabio Estevam

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=20171026132541.2d620e24@jawa \
    --to=lukma@denx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.