From: Jon Humphreys <j-humphreys@ti.com>
To: Siddharth Vadapalli <s-vadapalli@ti.com>, <vigneshr@ti.com>,
<bb@ti.com>, <trini@konsulko.com>, <lukma@denx.de>,
<n-francis@ti.com>, <mkorpershoek@baylibre.com>, <afd@ti.com>,
<glaroque@baylibre.com>, <sjoerd@collabora.com>,
<martyn.welch@collabora.com>, <rasmus.villemoes@prevas.dk>,
<caleb.connolly@linaro.org>, <rogerq@kernel.org>, <nm@ti.com>
Cc: <u-boot@lists.denx.de>, <srk@ti.com>, <s-vadapalli@ti.com>
Subject: Re: [PATCH 1/4] dfu: do not overwrite "dfu_alt_info"
Date: Tue, 17 Dec 2024 14:55:13 -0600 [thread overview]
Message-ID: <86ldwe3u8e.fsf@udb0321960.dhcp.ti.com> (raw)
In-Reply-To: <20241217131658.2920799-2-s-vadapalli@ti.com>
Siddharth Vadapalli <s-vadapalli@ti.com> writes:
> From: Jonathan Humphreys <j-humphreys@ti.com>
>
> For use-cases such as USB DFU Boot, "spl_dfu_cmd()" will setup the
> appropriate value for "dfu_alt_info". To facilitate such use-cases and
> in order to avoid overwriting the value of "dfu_alt_info", invoke the
> "set_dfu_alt_info()" function only when "dfu_alt_info" is not defined.
>
> Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
> ---
> drivers/dfu/dfu.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
> index 756569217bb..ab8abae1d89 100644
> --- a/drivers/dfu/dfu.c
> +++ b/drivers/dfu/dfu.c
> @@ -169,10 +169,13 @@ int dfu_init_env_entities(char *interface, char *devstr)
> dfu_reinit_needed = false;
> dfu_alt_info_changed = false;
>
> + str_env = env_get("dfu_alt_info");
> #ifdef CONFIG_SET_DFU_ALT_INFO
> - set_dfu_alt_info(interface, devstr);
> + if (!str_env) {
> + set_dfu_alt_info(interface, devstr);
> + str_env = env_get("dfu_alt_info");
> + }
> #endif
> - str_env = env_get("dfu_alt_info");
> if (!str_env) {
> pr_err("\"dfu_alt_info\" env variable not defined!\n");
> return -EINVAL;
> --
> 2.43.0
Hi Siddharth, thanks. I went ahead and just posted a separate patch to fix
this issue. I added a bit more explanation, and wanted it separate so that
it can hopefully make the 2025.01 release.
See https://lore.kernel.org/r/20241217204835.3312765-1-j-humphreys@ti.com.
Thanks
Jon
next prev parent reply other threads:[~2024-12-17 20:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-17 13:16 [PATCH 0/4] Add support for USB DFU boot on AM62Px Siddharth Vadapalli
2024-12-17 13:16 ` [PATCH 1/4] dfu: do not overwrite "dfu_alt_info" Siddharth Vadapalli
2024-12-17 20:55 ` Jon Humphreys [this message]
2024-12-18 4:55 ` Siddharth Vadapalli
2024-12-17 13:16 ` [PATCH 2/4] board: ti: am62px: env: include environment for DFU Boot Siddharth Vadapalli
2024-12-18 9:57 ` Mattijs Korpershoek
2024-12-18 10:14 ` Siddharth Vadapalli
2024-12-18 11:00 ` Mattijs Korpershoek
2024-12-18 11:38 ` Siddharth Vadapalli
2024-12-17 13:16 ` [PATCH 3/4] configs: am62x_r5_usbdfu: extend for AM62Px Siddharth Vadapalli
2024-12-18 9:58 ` Mattijs Korpershoek
2024-12-17 13:16 ` [PATCH 4/4] arm: dts: k3-am62p5-sk-u-boot: enable USB0 for USB DFU boot Siddharth Vadapalli
2024-12-18 10:00 ` Mattijs Korpershoek
2024-12-18 9:43 ` [PATCH 0/4] Add support for USB DFU boot on AM62Px Mattijs Korpershoek
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=86ldwe3u8e.fsf@udb0321960.dhcp.ti.com \
--to=j-humphreys@ti.com \
--cc=afd@ti.com \
--cc=bb@ti.com \
--cc=caleb.connolly@linaro.org \
--cc=glaroque@baylibre.com \
--cc=lukma@denx.de \
--cc=martyn.welch@collabora.com \
--cc=mkorpershoek@baylibre.com \
--cc=n-francis@ti.com \
--cc=nm@ti.com \
--cc=rasmus.villemoes@prevas.dk \
--cc=rogerq@kernel.org \
--cc=s-vadapalli@ti.com \
--cc=sjoerd@collabora.com \
--cc=srk@ti.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vigneshr@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox