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>
diff --git a/board/kontron/sl-mx8mm/sl-mx8mm.c b/board/kontron/sl-mx8mm/sl-mx8mm.c
index 48376cb..fea9327 100644
--- a/board/kontron/sl-mx8mm/sl-mx8mm.c
+++ b/board/kontron/sl-mx8mm/sl-mx8mm.c
@@ -6,12 +6,32 @@
#include <asm/arch/imx-regs.h>
#include <asm/global_data.h>
#include <asm/io.h>
+#include <efi.h>
+#include <efi_loader.h>
#include <fdt_support.h>
#include <linux/errno.h>
+#include <linux/kernel.h>
#include <net.h>
DECLARE_GLOBAL_DATA_PTR;
+#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT)
+struct efi_fw_image fw_images[] = {
+ {
+ .image_type_id = KONTRON_SL_MX8MM_FIT_IMAGE_GUID,
+ .fw_name = u"KONTROL-SL-MX8MM-UBOOT",
+ .image_index = 1,
+ },
+};
+
+struct efi_capsule_update_info update_info = {
+ .dfu_string = "sf 0:0=flash-bin raw 0x400 0x1f0000",
+ .images = fw_images,
+};
+
+u8 num_image_type_guids = ARRAY_SIZE(fw_images);
+#endif /* EFI_HAVE_CAPSULE_SUPPORT */
+
int board_phys_sdram_size(phys_size_t *size)
{
u32 ddr_size = readl(M4_BOOTROM_BASE_ADDR);