diff mbox series

[v2,5/5] board: ti: j784s4: evm: Set "dfu_alt_info" only if interface is Serial Flash

Message ID 20241124070828.617558-6-s-vadapalli@ti.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series EFI Capsule "dfu_alt_info" fixes for TI Boards | expand

Commit Message

Siddharth Vadapalli Nov. 24, 2024, 7:07 a.m. UTC
Commit a4d5e5daa847 ("board: sk-am69: Define capsule update firmware info")
updated the "dfu_alt_info" variable to support use-cases with Serial Flash.
However, this breaks use-cases where interface is not Serial Flash ("sf").
Fix this by setting "dfu_alt_info" only when the interface is "sf".

Fixes: a4d5e5daa847 ("board: sk-am69: Define capsule update firmware info")
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
---

v1:
https://patchwork.ozlabs.org/project/uboot/patch/20241124051545.382397-6-s-vadapalli@ti.com/
Changes since v1:
- Replaced "SPI Flash" with "Serial Flash" everywhere.

Regards,
Siddharth.

 board/ti/j784s4/evm.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Udit Kumar Nov. 25, 2024, 3:59 a.m. UTC | #1
Hi Siddharth

On 11/24/2024 12:37 PM, Siddharth Vadapalli wrote:
> Commit a4d5e5daa847 ("board: sk-am69: Define capsule update firmware info")
> updated the "dfu_alt_info" variable to support use-cases with Serial Flash.
> However, this breaks use-cases where interface is not Serial Flash ("sf").
> Fix this by setting "dfu_alt_info" only when the interface is "sf".
>
> Fixes: a4d5e5daa847 ("board: sk-am69: Define capsule update firmware info")
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>


AFAIR, DFU in general is not enabled on J784S4

Can i request to enable DFU along with this update.


> ---
>
> v1:
> https://patchwork.ozlabs.org/project/uboot/patch/20241124051545.382397-6-s-vadapalli@ti.com/
> Changes since v1:
> - Replaced "SPI Flash" with "Serial Flash" everywhere.
>
> Regards,
> Siddharth.
>
>   board/ti/j784s4/evm.c | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/board/ti/j784s4/evm.c b/board/ti/j784s4/evm.c
> index 548dbd5925..d915aee48f 100644
> --- a/board/ti/j784s4/evm.c
> +++ b/board/ti/j784s4/evm.c
> @@ -42,7 +42,13 @@ struct efi_capsule_update_info update_info = {
>   #if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO)
>   void set_dfu_alt_info(char *interface, char *devstr)
>   {
> -	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
> +	/*
> +	 * Since the EFI Capsule support is enabled only for Serial Flash,
> +	 * update the "dfu_alt_info" environment variable only if the
> +	 * interface happens to be "sf" (Serial Flash).
> +	 */
> +	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) &&
> +	    (strcmp(interface, "sf") == 0))
>   		env_set("dfu_alt_info", update_info.dfu_string);
>   }
>   #endif
Siddharth Vadapalli Nov. 25, 2024, 5:27 a.m. UTC | #2
On Mon, Nov 25, 2024 at 09:29:01AM +0530, Kumar, Udit wrote:
> Hi Siddharth
> 
> On 11/24/2024 12:37 PM, Siddharth Vadapalli wrote:
> > Commit a4d5e5daa847 ("board: sk-am69: Define capsule update firmware info")
> > updated the "dfu_alt_info" variable to support use-cases with Serial Flash.
> > However, this breaks use-cases where interface is not Serial Flash ("sf").
> > Fix this by setting "dfu_alt_info" only when the interface is "sf".
> > 
> > Fixes: a4d5e5daa847 ("board: sk-am69: Define capsule update firmware info")
> > Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
> 
> 
> AFAIR, DFU in general is not enabled on J784S4

Yes, it is not yet enabled.

> 
> Can i request to enable DFU along with this update.

This series is a pre-requisite for enabling/fixing USB DFU boot on
various devices. I will be enabling USB DFU boot on all TI K3 Boards,
but again, that doesn't have to be tied to this series and can be done
independently. This series is a fix, while enabling USB DFU boot on
devices is a new feature. So I don't think that the feature *has* to be
enabled along with this series.

Regards,
Siddharth.
diff mbox series

Patch

diff --git a/board/ti/j784s4/evm.c b/board/ti/j784s4/evm.c
index 548dbd5925..d915aee48f 100644
--- a/board/ti/j784s4/evm.c
+++ b/board/ti/j784s4/evm.c
@@ -42,7 +42,13 @@  struct efi_capsule_update_info update_info = {
 #if IS_ENABLED(CONFIG_SET_DFU_ALT_INFO)
 void set_dfu_alt_info(char *interface, char *devstr)
 {
-	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
+	/*
+	 * Since the EFI Capsule support is enabled only for Serial Flash,
+	 * update the "dfu_alt_info" environment variable only if the
+	 * interface happens to be "sf" (Serial Flash).
+	 */
+	if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT) &&
+	    (strcmp(interface, "sf") == 0))
 		env_set("dfu_alt_info", update_info.dfu_string);
 }
 #endif