From: Jon Humphreys <j-humphreys@ti.com>
To: Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Roger Quadros <rogerq@kernel.org>
Cc: Mattijs Korpershoek <mkorpershoek@baylibre.com>,
Kamlesh Gurudasani <kamlesh@ti.com>,
Manorit Chawdhry <m-chawdhry@ti.com>,
"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
Judith Mendez <jm@ti.com>,
"Christian Gmeiner" <christian.gmeiner@gmail.com>,
Devarsh Thakkar <devarsht@ti.com>, Simon Glass <sjg@chromium.org>,
Nikhil M Jain <n-jain1@ti.com>,
"Neha Malcom Francis" <n-francis@ti.com>,
Andrew Davis <afd@ti.com>, "Maxime Ripard" <mripard@kernel.org>,
Siddharth Vadapalli <s-vadapalli@ti.com>,
Bryan Brattlof <bb@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
"Robert Nelson" <robertcnelson@gmail.com>,
Nishanth Menon <nm@ti.com>, Tom Rini <trini@konsulko.com>,
Sughosh Ganu <sughosh.ganu@linaro.org>,
"Masahisa Kojima" <kojima.masahisa@socionext.com>,
Marcel Ziswiler <marcel.ziswiler@toradex.com>,
<u-boot@lists.denx.de>
Subject: Re: [PATCH v4 15/19] board: am62px: Define capsule update firmware info
Date: Fri, 24 May 2024 10:38:04 -0500 [thread overview]
Message-ID: <86bk4vcjab.fsf@udb0321960.dhcp.ti.com> (raw)
In-Reply-To: <Zk--WFQJC-wi5zE5@hera>
Ilias Apalodimas <ilias.apalodimas@linaro.org> writes:
> Hi Jonathan
>
> Thanks for working on this
>
> On Thu, May 09, 2024 at 11:41:19AM -0500, Jonathan Humphreys wrote:
>> Define the firmware components updatable via EFI capsule update, including
>> defining capsule GUIDs for the various firmware components for the AM62px
>> SK.
>>
>> Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
>> ---
>> board/ti/am62px/evm.c | 32 ++++++++++++++++++++++++++++++++
>> include/configs/am62px_evm.h | 24 ++++++++++++++++++++++++
>> 2 files changed, 56 insertions(+)
>>
>> diff --git a/board/ti/am62px/evm.c b/board/ti/am62px/evm.c
>> index 97a95ce8cc2..6d0f66e5dc0 100644
>> --- a/board/ti/am62px/evm.c
>> +++ b/board/ti/am62px/evm.c
>> @@ -6,6 +6,7 @@
>> *
>> */
>>
>> +#include <efi_loader.h>
>> #include <asm/arch/hardware.h>
>> #include <asm/io.h>
>> #include <dm/uclass.h>
>> @@ -13,6 +14,37 @@
>> #include <fdt_support.h>
>> #include <spl.h>
>>
>> +struct efi_fw_image fw_images[] = {
>
> It's better if we add an
> #if IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT)
> for both of the structs that follow (and it applies to all your patches)
>
Ilias, thanks for the reviews.
I had this protected in #if's in an earlier patch set, as you suggest here.
However, in those reviews, Roger recommended that we don't do that and put
conditions around the use of it in set_dfu_alt_info().
https://lore.kernel.org/all/b19f02e0-a80a-46d6-8296-5d516577766a@kernel.org/
I assume the reasoning is to reduce #if's in the code and rely on the
compiler to be smart enough to remove dead data. (Roger, speak up if I
misrepresent you.)
I'm ok to do either way. What is the preferred way in U-Boot?
Thanks
Jon
>> + {
>> + .image_type_id = AM62PX_SK_TIBOOT3_IMAGE_GUID,
>> + .fw_name = u"AM62PX_SK_TIBOOT3",
>> + .image_index = 1,
>> + },
>> + {
>> + .image_type_id = AM62PX_SK_SPL_IMAGE_GUID,
>> + .fw_name = u"AM62PX_SK_SPL",
>> + .image_index = 2,
>> + },
>> + {
>> + .image_type_id = AM62PX_SK_UBOOT_IMAGE_GUID,
>> + .fw_name = u"AM62PX_SK_UBOOT",
>> + .image_index = 3,
>> + }
>> +};
>> +
>> +struct efi_capsule_update_info update_info = {
>> + .dfu_string = "sf 0:0=tiboot3.bin raw 0 80000;"
>> + "tispl.bin raw 80000 200000;u-boot.img raw 280000 400000",
>> + .num_images = ARRAY_SIZE(fw_images),
>> + .images = fw_images,
>> +};
>
> I haven't worked on any TI platforms lately so I cant say much about the
> naming and the flash regions. The definition seems correct
>
>
>> +
>> +void set_dfu_alt_info(char *interface, char *devstr)
>> +{
>> + if (IS_ENABLED(CONFIG_EFI_HAVE_CAPSULE_SUPPORT))
>> + env_set("dfu_alt_info", update_info.dfu_string);
>> +}
>
> There's a CONFIG_SET_DFU_ALT_INFO symbol. This better if we add a check here
> as well
>
>> +
>> int board_init(void)
>> {
>> return 0;
>> diff --git a/include/configs/am62px_evm.h b/include/configs/am62px_evm.h
>> index 06b12860e21..57a1ba9dc3c 100644
>> --- a/include/configs/am62px_evm.h
>> +++ b/include/configs/am62px_evm.h
>> @@ -8,6 +8,30 @@
>> #ifndef __CONFIG_AM62PX_EVM_H
>> #define __CONFIG_AM62PX_EVM_H
>>
> [...]
>
> Regards
> /Ilias
next prev parent reply other threads:[~2024-05-24 15:38 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-09 16:41 [PATCH v4 00/19] EFI: ti: Enable EFI capsule updates Jonathan Humphreys
2024-05-09 16:41 ` [PATCH v4 01/19] doc: uefi: capsules: Add Capsule Update porting section Jonathan Humphreys
2024-05-10 5:35 ` Ilias Apalodimas
2024-05-09 16:41 ` [PATCH v4 02/19] board: am64x: Define capsule update firmware info Jonathan Humphreys
2024-05-09 16:41 ` [PATCH v4 03/19] configs: am64x: Enable EFI capsule update Jonathan Humphreys
2024-05-09 16:41 ` [PATCH v4 04/19] doc: board: ti: am64x: document OSPI layout Jonathan Humphreys
2024-05-09 22:23 ` Tom Rini
2024-05-09 16:41 ` [PATCH v4 05/19] board: j721e: Define capsule update firmware info Jonathan Humphreys
2024-05-09 16:41 ` [PATCH v4 06/19] configs: j721e: Enable EFI capsule update Jonathan Humphreys
2024-05-09 16:41 ` [PATCH v4 07/19] doc: board: ti: j721e: document OSPI layout Jonathan Humphreys
2024-05-09 22:23 ` Tom Rini
2024-05-09 16:41 ` [PATCH v4 08/19] board: beagleplay: Define capsule update firmware info Jonathan Humphreys
2024-05-09 16:41 ` [PATCH v4 09/19] configs: beagleplay: Enable DFU for MMC Jonathan Humphreys
2024-05-09 16:41 ` [PATCH v4 10/19] configs: beagleplay: Enable EFI capsule update Jonathan Humphreys
2024-05-09 16:41 ` [PATCH v4 11/19] configs: am62x: Enable serial flash DFU Jonathan Humphreys
2024-05-09 16:41 ` [PATCH v4 12/19] board: am62x: Define capsule update firmware info Jonathan Humphreys
2024-05-09 16:41 ` [PATCH v4 13/19] configs: am62x: Enable EFI capsule update Jonathan Humphreys
2024-05-09 16:41 ` [PATCH v4 14/19] doc: board: ti: am62x: document OSPI layout Jonathan Humphreys
2024-05-09 22:23 ` Tom Rini
2024-05-09 16:41 ` [PATCH v4 15/19] board: am62px: Define capsule update firmware info Jonathan Humphreys
2024-05-23 22:08 ` Ilias Apalodimas
2024-05-24 15:38 ` Jon Humphreys [this message]
2024-05-30 16:04 ` Ilias Apalodimas
2024-05-31 4:09 ` Jon Humphreys
2024-05-31 9:30 ` Ilias Apalodimas
2024-05-09 16:41 ` [PATCH v4 16/19] configs: am62px: Enable EFI capsule update Jonathan Humphreys
2024-05-09 16:41 ` [PATCH v4 17/19] doc: board: ti: am62px: document OSPI layout Jonathan Humphreys
2024-05-09 22:23 ` Tom Rini
2024-05-09 16:41 ` [PATCH v4 18/19] board: beagleboneai64: Define capsule update firmware info Jonathan Humphreys
2024-05-09 16:41 ` [PATCH v4 19/19] configs: beagleboneai64: Enable EFI capsule update Jonathan Humphreys
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=86bk4vcjab.fsf@udb0321960.dhcp.ti.com \
--to=j-humphreys@ti.com \
--cc=afd@ti.com \
--cc=bb@ti.com \
--cc=christian.gmeiner@gmail.com \
--cc=devarsht@ti.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jm@ti.com \
--cc=kamlesh@ti.com \
--cc=kojima.masahisa@socionext.com \
--cc=m-chawdhry@ti.com \
--cc=marcel.ziswiler@toradex.com \
--cc=mkorpershoek@baylibre.com \
--cc=mripard@kernel.org \
--cc=n-francis@ti.com \
--cc=n-jain1@ti.com \
--cc=nm@ti.com \
--cc=robertcnelson@gmail.com \
--cc=rogerq@kernel.org \
--cc=s-vadapalli@ti.com \
--cc=sjg@chromium.org \
--cc=sughosh.ganu@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vigneshr@ti.com \
--cc=xypron.glpk@gmx.de \
/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