From 0300b8067baf4149501e146df87bdc15a9f24802 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Thu, 2 Jun 2022 11:01:32 +0200 Subject: ARM: stm32mp: bbu: add FIP update handler BootROM boots from GPT partition fsbl1 or fsbl2 on SD-Card and from boot partition on eMMC. Recent TF-A without legacy image support will then look in a GPT partition named fip in the user area. With recent patches[1], TF-A will also check offset SZ_256K in the boot partition to see if the FIP is there. Add a barebox_update handler that covers these scenarios. [1]: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/15332 Signed-off-by: Ahmad Fatoum Link: https://lore.barebox.org/20220602090133.3190450-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer --- arch/arm/mach-stm32mp/include/mach/bbu.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'arch/arm/mach-stm32mp/include') diff --git a/arch/arm/mach-stm32mp/include/mach/bbu.h b/arch/arm/mach-stm32mp/include/mach/bbu.h index 3a6951a8f1..b469cdeb7c 100644 --- a/arch/arm/mach-stm32mp/include/mach/bbu.h +++ b/arch/arm/mach-stm32mp/include/mach/bbu.h @@ -13,4 +13,20 @@ static inline int stm32mp_bbu_mmc_register_handler(const char *name, filetype_stm32_image_ssbl_v1); } +#ifdef CONFIG_BAREBOX_UPDATE + +int stm32mp_bbu_mmc_fip_register(const char *name, const char *devicefile, + unsigned long flags); + +#else + +static inline int stm32mp_bbu_mmc_fip_register(const char *name, + const char *devicefile, + unsigned long flags) +{ + return -ENOSYS; +} + +#endif + #endif /* MACH_STM32MP_BBU_H_ */ -- cgit v1.2.3