Message ID | 20241124070828.617558-2-s-vadapalli@ti.com |
---|---|
State | Changes Requested |
Delegated to: | Tom Rini |
Headers | show |
Series | EFI Capsule "dfu_alt_info" fixes for TI Boards | expand |
On 11/24/2024 12:37 PM, Siddharth Vadapalli wrote: > Commit 5b84d2de5e6c ("board: am64x: 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: 5b84d2de5e6c ("board: am64x: Define capsule update firmware info") > Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> > --- > > v1: > https://patchwork.ozlabs.org/project/uboot/patch/20241124051545.382397-2-s-vadapalli@ti.com/ > Changes since v1: > - Replaced "SPI Flash" with "Serial Flash" everywhere. > > Regards, > Siddharth. > > board/ti/am64x/evm.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c > index 00b8317d6b..18f7770bc1 100644 > --- a/board/ti/am64x/evm.c > +++ b/board/ti/am64x/evm.c > @@ -56,7 +56,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)) Could you evaluate possibility of moving this function along with others to board/ti/common/ area. Regards Udit > + /* > + * 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
On Mon, Nov 25, 2024 at 09:27:50AM +0530, Kumar, Udit wrote: > On 11/24/2024 12:37 PM, Siddharth Vadapalli wrote: > > Commit 5b84d2de5e6c ("board: am64x: 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: 5b84d2de5e6c ("board: am64x: Define capsule update firmware info") > > Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> > > --- > > > > v1: > > https://patchwork.ozlabs.org/project/uboot/patch/20241124051545.382397-2-s-vadapalli@ti.com/ > > Changes since v1: > > - Replaced "SPI Flash" with "Serial Flash" everywhere. > > > > Regards, > > Siddharth. > > > > board/ti/am64x/evm.c | 8 +++++++- > > 1 file changed, 7 insertions(+), 1 deletion(-) > > > > diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c > > index 00b8317d6b..18f7770bc1 100644 > > --- a/board/ti/am64x/evm.c > > +++ b/board/ti/am64x/evm.c > > @@ -56,7 +56,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)) > > Could you evaluate possibility of moving this function along with others to > > board/ti/common/ area. Sure, but that doesn't have to be tied to this fix. I will take a look at it independent of this series. Regards, Siddharth.
On 11/25/2024 10:55 AM, Siddharth Vadapalli wrote: > On Mon, Nov 25, 2024 at 09:27:50AM +0530, Kumar, Udit wrote: >> On 11/24/2024 12:37 PM, Siddharth Vadapalli wrote: >>> Commit 5b84d2de5e6c ("board: am64x: 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: 5b84d2de5e6c ("board: am64x: Define capsule update firmware info") >>> Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> >>> --- >>> >>> v1: >>> https://patchwork.ozlabs.org/project/uboot/patch/20241124051545.382397-2-s-vadapalli@ti.com/ >>> Changes since v1: >>> - Replaced "SPI Flash" with "Serial Flash" everywhere. >>> >>> Regards, >>> Siddharth. >>> >>> board/ti/am64x/evm.c | 8 +++++++- >>> 1 file changed, 7 insertions(+), 1 deletion(-) >>> >>> diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c >>> index 00b8317d6b..18f7770bc1 100644 >>> --- a/board/ti/am64x/evm.c >>> +++ b/board/ti/am64x/evm.c >>> @@ -56,7 +56,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)) >> Could you evaluate possibility of moving this function along with others to >> >> board/ti/common/ area. > Sure, but that doesn't have to be tied to this fix. I will take a look > at it independent of this series. Ok, Please take care in other series. For this series Acked-by: Udit Kumar <u-kumar1@ti.com> > > Regards, > Siddharth.
On 24/11/24 12:37, Siddharth Vadapalli wrote: > Commit 5b84d2de5e6c ("board: am64x: 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: 5b84d2de5e6c ("board: am64x: Define capsule update firmware info") > Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> > --- > > v1: > https://patchwork.ozlabs.org/project/uboot/patch/20241124051545.382397-2-s-vadapalli@ti.com/ > Changes since v1: > - Replaced "SPI Flash" with "Serial Flash" everywhere. > > Regards, > Siddharth. > > board/ti/am64x/evm.c | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > > diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c > index 00b8317d6b..18f7770bc1 100644 > --- a/board/ti/am64x/evm.c > +++ b/board/ti/am64x/evm.c > @@ -56,7 +56,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)) IIUC, EFI_HAVE_CAPSULE_SUPPORT is probably only functional at U-Boot proper and not at SPL (I dont see any SPL_EFI_* options), so would this work instead? if (CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT) { ... } > env_set("dfu_alt_info", update_info.dfu_string); > } > #endif
On Tue, Nov 26, 2024 at 10:33:30AM +0530, Vignesh Raghavendra wrote: Hello Vignesh, [...] > > + /* > > + * 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)) > > IIUC, EFI_HAVE_CAPSULE_SUPPORT is probably only functional at U-Boot > proper and not at SPL (I dont see any SPL_EFI_* options), so would this > work instead? > > if (CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT) { > ... > } This works! Thank you for the suggestion. Regards, Siddharth.
diff --git a/board/ti/am64x/evm.c b/board/ti/am64x/evm.c index 00b8317d6b..18f7770bc1 100644 --- a/board/ti/am64x/evm.c +++ b/board/ti/am64x/evm.c @@ -56,7 +56,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
Commit 5b84d2de5e6c ("board: am64x: 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: 5b84d2de5e6c ("board: am64x: Define capsule update firmware info") Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com> --- v1: https://patchwork.ozlabs.org/project/uboot/patch/20241124051545.382397-2-s-vadapalli@ti.com/ Changes since v1: - Replaced "SPI Flash" with "Serial Flash" everywhere. Regards, Siddharth. board/ti/am64x/evm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)