aboutsummaryrefslogtreecommitdiff
path: root/board/socionext/developerbox
diff options
context:
space:
mode:
authorSughosh Ganu2022-04-15 11:29:34 +0530
committerHeinrich Schuchardt2022-04-15 10:43:18 +0200
commit741ef867288bb294039e34ab2287ffe981b05b86 (patch)
tree283cab5cd74fea8b86672de3dc3fdb674117dd17 /board/socionext/developerbox
parent42a2d90cf51acea56bf19006ed5688c93c099ff0 (diff)
capsule: board: Add information needed for capsule updates
Add a structure which defines the information that is needed for executing capsule updates on a platform. Some information in the structure like the dfu string is used for making the update process more robust while some information like the per platform image GUIDs is used for fixing issues. Initialise this structure in the board file, and use the information for the capsule updates. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
Diffstat (limited to 'board/socionext/developerbox')
-rw-r--r--board/socionext/developerbox/developerbox.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/board/socionext/developerbox/developerbox.c b/board/socionext/developerbox/developerbox.c
index 9552bfcdc3b..f5a5fe01210 100644
--- a/board/socionext/developerbox/developerbox.c
+++ b/board/socionext/developerbox/developerbox.c
@@ -10,10 +10,43 @@
#include <asm/global_data.h>
#include <asm/io.h>
#include <common.h>
+#include <efi.h>
+#include <efi_loader.h>
#include <env_internal.h>
#include <fdt_support.h>
#include <log.h>
+#include <linux/kernel.h>
+
+#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT)
+struct efi_fw_image fw_images[] = {
+ {
+ .image_type_id = DEVELOPERBOX_UBOOT_IMAGE_GUID,
+ .fw_name = u"DEVELOPERBOX-UBOOT",
+ .image_index = 1,
+ },
+ {
+ .image_type_id = DEVELOPERBOX_FIP_IMAGE_GUID,
+ .fw_name = u"DEVELOPERBOX-FIP",
+ .image_index = 2,
+ },
+ {
+ .image_type_id = DEVELOPERBOX_OPTEE_IMAGE_GUID,
+ .fw_name = u"DEVELOPERBOX-OPTEE",
+ .image_index = 3,
+ },
+};
+
+struct efi_capsule_update_info update_info = {
+ .dfu_string = "mtd nor1=u-boot.bin raw 200000 100000;"
+ "fip.bin raw 180000 78000;"
+ "optee.bin raw 500000 100000",
+ .images = fw_images,
+};
+
+u8 num_image_type_guids = ARRAY_SIZE(fw_images);
+#endif /* EFI_HAVE_CAPSULE_SUPPORT */
+
static struct mm_region sc2a11_mem_map[] = {
{
.virt = 0x0UL,