From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexandru Gagniuc Date: Thu, 1 Apr 2021 13:25:30 -0500 Subject: [PATCH v3 5/6] image-fit: Accept IH_TYPE_FIRMWARE in fit_image_load() as valid In-Reply-To: <20210401182531.2147653-1-mr.nuke.me@gmail.com> References: <20210401182531.2147653-1-mr.nuke.me@gmail.com> Message-ID: <20210401182531.2147653-6-mr.nuke.me@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Consider the following FIT: images { whipple {}; }; configurations { conf-1 { firmware = "whipple"; }; }; Getting the 'firmware' image with fit_image_load() is not possible, as it doesn't understand 'firmware =' properties. Although one could pass IH_TYPE_FIRMWARE for 'image_type', this needs to be converted to a "firmware" string for FDT lookup -- exactly what this change does. Signed-off-by: Alexandru Gagniuc Reviewed-by: Simon Glass --- common/image-fit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/image-fit.c b/common/image-fit.c index 94501b1071..970e3f89da 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1955,6 +1955,8 @@ static const char *fit_get_image_type_property(int type) return FIT_FDT_PROP; case IH_TYPE_KERNEL: return FIT_KERNEL_PROP; + case IH_TYPE_FIRMWARE: + return FIT_FIRMWARE_PROP; case IH_TYPE_RAMDISK: return FIT_RAMDISK_PROP; case IH_TYPE_X86_SETUP: -- 2.26.3