From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F2FC9C43334 for ; Fri, 15 Jul 2022 06:36:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 903A48413D; Fri, 15 Jul 2022 08:36:15 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="pJeaFheh"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C74B684121; Fri, 15 Jul 2022 08:36:13 +0200 (CEST) Received: from mail-yw1-x112b.google.com (mail-yw1-x112b.google.com [IPv6:2607:f8b0:4864:20::112b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0B5A18413D for ; Fri, 15 Jul 2022 08:36:11 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=ilias.apalodimas@linaro.org Received: by mail-yw1-x112b.google.com with SMTP id 00721157ae682-31c9b70c382so38380627b3.6 for ; Thu, 14 Jul 2022 23:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=YFbLuvmClkoQBrn1cZJqTsxvsDNgEbg11n+KZbJ0o44=; b=pJeaFhehp+8ckWdH+hfbEK5K3/s5gvQGEYCBkP8jce/R7VfQNCqeh2BvsdkAVbSnlV iva7VQlJUbvVFhB866A83Gi/JyysFFbZG+YgfyWtUYgosEvrnmn6i5D5pyF17jybHRzy m96j+fEpmkcwxEG12PizYKTsH98HBQqJVJEw6lsawb3rJ58IEREwL7qVdr0mbFlhNzOh 4eQlyUK+Ds+4KpoSTz9sbGqH+EtRzaDLc30pVOTUAHEVJkdAPBzb5gSACDGyRsEwbWAC 6EnuC5g6lRikrIv3DQMkQSyFWDpe+tMC9IU6FKkIJ7ATykdmXQspFFApGLVK0BANeSXX pdsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=YFbLuvmClkoQBrn1cZJqTsxvsDNgEbg11n+KZbJ0o44=; b=ZRSq02fGIT//jqn1jKllCwNDgXLOkKJjcDIjuh6nlo7FXs+PyTZWYFdmhxeDGhBUyK jMWOIe4+l4/1jFT4cPqUKqoztgn4c7EFepDjQY1Uz9RE3ZhgYQyjcg/gvsQeyvmQJ5bL X+IQW3t2F/LeUPwxfPwAcK4KZK66Ndm2EoG15KBmEIvtNbRTwkMRCp/neeIDxUOxJ6NE /o1Sl9hWuOMzP3NT1BK4bOq5fM5HZnIizd2bFYI8SMEDHukUUASnX5iGi36hSf9hRZBV moY7gyL1CdpEt8VOgdYuWyLbxBjKTQTu3yXzzHcev3sMINt7byGIT/wjuD34J9cS30FY DZvg== X-Gm-Message-State: AJIora9DvSXSTaIi43ubahBBIIEwkB5MlAjhe+BpYoAqoqJQHjUaBsYH 8PnmQI4jXe3eStQeupbXk7bwy9S+JuoB5Joe6hgDNQ== X-Google-Smtp-Source: AGRyM1ta+urabDX0ohl95JFpTeyuk09+f4lYcokQz7IEo5oSIaklAggdJictjKORfxj5ioTaGfO4ziqwWGhbhhv0hu4= X-Received: by 2002:a81:4e94:0:b0:31c:b5c9:5148 with SMTP id c142-20020a814e94000000b0031cb5c95148mr14440103ywb.128.1657866969786; Thu, 14 Jul 2022 23:36:09 -0700 (PDT) MIME-Version: 1.0 References: <20220714183913.118505-1-sughosh.ganu@linaro.org> <20220714183913.118505-6-sughosh.ganu@linaro.org> In-Reply-To: <20220714183913.118505-6-sughosh.ganu@linaro.org> From: Ilias Apalodimas Date: Fri, 15 Jul 2022 09:35:33 +0300 Message-ID: Subject: Re: [PATCH v7 05/13] stm32mp1: dk2: Add image information for capsule updates To: Sughosh Ganu Cc: u-boot@lists.denx.de, Heinrich Schuchardt , Takahiro Akashi , Patrick Delaunay , Patrice Chotard , Simon Glass , Bin Meng , Tom Rini , Etienne Carriere , Michal Simek , Jassi Brar Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On Thu, 14 Jul 2022 at 21:40, Sughosh Ganu wrote: > > Enabling capsule update functionality on the platform requires > populating information on the images that are to be updated using the > functionality. Do so for the DK2 board. > > Signed-off-by: Sughosh Ganu > Reviewed-by: Patrick Delaunay > --- > Changes since V6: > * s/STM32MP1/STM32MP15/ as suggested by Patrick > > board/st/stm32mp1/stm32mp1.c | 19 +++++++++++++++++++ > include/configs/stm32mp15_common.h | 4 ++++ > 2 files changed, 23 insertions(+) > > diff --git a/board/st/stm32mp1/stm32mp1.c b/board/st/stm32mp1/stm32mp1.c > index 9496890d16..e3a04f8d8a 100644 > --- a/board/st/stm32mp1/stm32mp1.c > +++ b/board/st/stm32mp1/stm32mp1.c > @@ -11,6 +11,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -87,6 +88,16 @@ > #define USB_START_LOW_THRESHOLD_UV 1230000 > #define USB_START_HIGH_THRESHOLD_UV 2150000 > > +#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT) > +struct efi_fw_image fw_images[1]; > + > +struct efi_capsule_update_info update_info = { > + .images = fw_images, > +}; > + > +u8 num_image_type_guids = ARRAY_SIZE(fw_images); > +#endif /* EFI_HAVE_CAPSULE_SUPPORT */ > + > int board_early_init_f(void) > { > /* nothing to do, only used in SPL */ > @@ -670,6 +681,14 @@ int board_init(void) > > setup_led(LEDST_ON); > > +#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT) > + if (board_is_stm32mp15x_dk2()) { > + efi_guid_t image_type_guid = STM32MP15_DK2_FIP_IMAGE_GUID; > + guidcpy(&fw_images[0].image_type_id, &image_type_guid); > + fw_images[0].fw_name = u"STM32MP15-DK2-FIP"; > + fw_images[0].image_index = 5; > + } > +#endif > return 0; > } > > diff --git a/include/configs/stm32mp15_common.h b/include/configs/stm32mp15_common.h > index c5412ffeb3..6ab10d8ce5 100644 > --- a/include/configs/stm32mp15_common.h > +++ b/include/configs/stm32mp15_common.h > @@ -34,6 +34,10 @@ > #define CONFIG_SERVERIP 192.168.1.1 > #endif > > +#define STM32MP15_DK2_FIP_IMAGE_GUID \ > + EFI_GUID(0x19d5df83, 0x11b0, 0x457b, 0xbe, 0x2c, \ > + 0x75, 0x59, 0xc1, 0x31, 0x42, 0xa5) > + > /*****************************************************************************/ > #ifdef CONFIG_DISTRO_DEFAULTS > /*****************************************************************************/ > -- > 2.34.1 > Reviewed-by: Ilias Apalodimas