All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrice CHOTARD <patrice.chotard@foss.st.com>
To: Patrick Delaunay <patrick.delaunay@foss.st.com>, <u-boot@lists.denx.de>
Cc: Patrick Delaunay <patrick.delaunay@st.com>,
	U-Boot STM32 <uboot-stm32@st-md-mailman.stormreply.com>
Subject: Re: [PATCH 05/10] stm32mp: stm32prog: handle the next phase after USB re-enumeration
Date: Fri, 28 May 2021 14:53:57 +0200	[thread overview]
Message-ID: <04258ce5-ba72-ae3d-a4ea-3a704c9f1269@foss.st.com> (raw)
In-Reply-To: <20210518151206.5.Ic81eb7eb5bd44c0d9022eb4b7aed823a934eecda@changeid>

Hi Patrick

On 5/18/21 3:12 PM, Patrick Delaunay wrote:
> Handle the second USB enumeration only when the flashlayout is received
> and when phase is PHASE_FLASHLAYOUT. This patch removes the call of
> stm32prog_next_phase as it is already done in stm32prog_dfu_init().
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
> ---
> 
>  arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
> index bc44d9fc8f..d4a3f7ea16 100644
> --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
> +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
> @@ -207,13 +207,10 @@ bool stm32prog_usb_loop(struct stm32prog_data *data, int dev)
>  
>  	if (stm32prog_data->phase == PHASE_FLASHLAYOUT) {
>  		ret = run_usb_dnl_gadget(dev, "usb_dnl_dfu");
> -		if (ret || stm32prog_data->phase == PHASE_DO_RESET)
> +		if (ret || stm32prog_data->phase != PHASE_FLASHLAYOUT)
>  			return ret;
>  		/* prepare the second enumeration with the FlashLayout */
> -		if (stm32prog_data->phase == PHASE_FLASHLAYOUT)
> -			stm32prog_dfu_init(data);
> -		/* found next selected partition */
> -		stm32prog_next_phase(data);
> +		stm32prog_dfu_init(data);
>  	}
>  
>  	ret = run_usb_dnl_gadget(dev, "usb_dnl_dfu");
> 
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>

Thanks
Patrice

  reply	other threads:[~2021-05-28 12:54 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 13:12 [PATCH 00/10] stm32mp: stm32prog: several features and fixes Patrick Delaunay
2021-05-18 13:12 ` [PATCH 01/10] stm32mp: stm32prog: remove all the header check for UART download Patrick Delaunay
2021-05-28 12:53   ` Patrice CHOTARD
2021-06-18  7:57     ` [Uboot-stm32] " Patrice CHOTARD
2021-05-18 13:12 ` [PATCH 02/10] stm32mp: stm32prog: add timeout in stm32prog_serial_get_buffer Patrick Delaunay
2021-05-28 12:53   ` Patrice CHOTARD
2021-06-18  7:57     ` [Uboot-stm32] " Patrice CHOTARD
2021-05-18 13:12 ` [PATCH 03/10] stm32mp: stm32prog: add support of initrd in flashlayout Patrick Delaunay
2021-05-28 12:53   ` Patrice CHOTARD
2021-06-18  7:57     ` [Uboot-stm32] " Patrice CHOTARD
2021-05-18 13:12 ` [PATCH 04/10] stm32mp: stm32prog: solve compilation with CONFIG_FIT_SIGNATURE Patrick Delaunay
2021-05-28 12:53   ` Patrice CHOTARD
2021-06-18  7:57     ` [Uboot-stm32] " Patrice CHOTARD
2021-05-18 13:12 ` [PATCH 05/10] stm32mp: stm32prog: handle the next phase after USB re-enumeration Patrick Delaunay
2021-05-28 12:53   ` Patrice CHOTARD [this message]
2021-06-18  7:57     ` [Uboot-stm32] " Patrice CHOTARD
2021-05-18 13:12 ` [PATCH 06/10] stm32mp: stm32prog: correctly handle DM_PMIC Patrick Delaunay
2021-05-28 12:54   ` Patrice CHOTARD
2021-05-30 21:44     ` Jaehoon Chung
2021-06-18  7:57     ` [Uboot-stm32] " Patrice CHOTARD
2021-05-18 13:12 ` [PATCH 07/10] stm32mp: stm32prog: use get_cpu_dev for GetID command Patrick Delaunay
2021-05-28 12:54   ` Patrice CHOTARD
2021-06-18  7:56     ` [Uboot-stm32] " Patrice CHOTARD
2021-05-18 13:12 ` [PATCH 08/10] stm32mp: stm32prog: change one message level to debug Patrick Delaunay
2021-05-28 12:54   ` Patrice CHOTARD
2021-06-18  7:56     ` [Uboot-stm32] " Patrice CHOTARD
2021-05-18 13:12 ` [PATCH 09/10] dfu: add error callback Patrick Delaunay
2021-05-28 12:54   ` [Uboot-stm32] " Patrice CHOTARD
2021-06-18  7:56     ` Patrice CHOTARD
2021-05-18 13:12 ` [PATCH 10/10] stm32mp: stm32prog: handle dfu error Patrick Delaunay
2021-05-28 12:54   ` Patrice CHOTARD
2021-06-18  7:56     ` Patrice CHOTARD

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=04258ce5-ba72-ae3d-a4ea-3a704c9f1269@foss.st.com \
    --to=patrice.chotard@foss.st.com \
    --cc=patrick.delaunay@foss.st.com \
    --cc=patrick.delaunay@st.com \
    --cc=u-boot@lists.denx.de \
    --cc=uboot-stm32@st-md-mailman.stormreply.com \
    /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.