diff mbox series

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

Message ID 20241124070828.617558-3-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 9bd6cc292fa8 ("board: j721e: 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: 9bd6cc292fa8 ("board: j721e: Define capsule update firmware info")
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
---

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

Regards,
Siddharth.

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

Comments

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

On 11/24/2024 12:37 PM, Siddharth Vadapalli wrote:
> Commit 9bd6cc292fa8 ("board: j721e: 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".


I am not sure, if we are on same page.

Setting this dfu_alt_info on shell works for me

https://gist.github.com/uditkumarti/e5185838bcc32b47f5d9dae48eff72c9

> Fixes: 9bd6cc292fa8 ("board: j721e: Define capsule update firmware info")
> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
> ---
>
> v1:
> https://patchwork.ozlabs.org/project/uboot/patch/20241124051545.382397-3-s-vadapalli@ti.com/
> Changes since v1:
> - Replaced "SPI Flash" with "Serial Flash" everywhere.
>
> Regards,
> Siddharth.
>
>   board/ti/j721e/evm.c | 8 +++++++-
>   1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
> index 6221be9dcf..ae24964ab9 100644
> --- a/board/ti/j721e/evm.c
> +++ b/board/ti/j721e/evm.c
> @@ -67,7 +67,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:24 a.m. UTC | #2
On Mon, Nov 25, 2024 at 09:27:08AM +0530, Kumar, Udit wrote:
> Hi Siddharth

Hello Udit,

> 
> On 11/24/2024 12:37 PM, Siddharth Vadapalli wrote:
> > Commit 9bd6cc292fa8 ("board: j721e: 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".
> 
> 
> I am not sure, if we are on same page.
> 
> Setting this dfu_alt_info on shell works for me
> 
> https://gist.github.com/uditkumarti/e5185838bcc32b47f5d9dae48eff72c9

The fix is for DFU Boot i.e. loading tiboot3.bin, tispl.bin and
u-boot.img via USB DFU Boot. Please refer to the cover letter for
details on the issue observed when attempting to boot AM625-SK via USB
DFU Boot.

Regards,
Siddharth.
diff mbox series

Patch

diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c
index 6221be9dcf..ae24964ab9 100644
--- a/board/ti/j721e/evm.c
+++ b/board/ti/j721e/evm.c
@@ -67,7 +67,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