diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2022-06-02 11:01:32 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-06-03 09:17:27 +0200 |
commit | 0300b8067baf4149501e146df87bdc15a9f24802 (patch) | |
tree | 1d09c5e8e8db1369818fbb1f3e695dfecb06e987 /arch/arm/mach-stm32mp/include | |
parent | 0a7bbd4e6ca36a311e4f2232c3d757faf58d7a8e (diff) | |
download | barebox-0300b8067baf4149501e146df87bdc15a9f24802.tar.gz barebox-0300b8067baf4149501e146df87bdc15a9f24802.tar.xz |
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 <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220602090133.3190450-7-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-stm32mp/include')
-rw-r--r-- | arch/arm/mach-stm32mp/include/mach/bbu.h | 16 |
1 files changed, 16 insertions, 0 deletions
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_ */ |