aboutsummaryrefslogtreecommitdiff
path: root/include/fwu.h
diff options
context:
space:
mode:
authorSughosh Ganu2022-10-21 18:16:00 +0530
committerTom Rini2022-10-31 14:47:32 -0400
commit95b5a7de30f6c2f6c38ac4919442c7d8d6fb86ce (patch)
treeb4d6f06af81e5820699f62594f191c6da1eaaf5e /include/fwu.h
parent7d6e2c54b7dd057f50bf0116c9e803e214dbe74c (diff)
FWU: STM32MP1: Add support to read boot index from backup register
The FWU Multi Bank Update feature allows the platform to boot the firmware images from one of the partitions(banks). The first stage bootloader(fsbl) passes the value of the boot index, i.e. the bank from which the firmware images were booted from to U-Boot. On the STM32MP157C-DK2 board, this value is passed through one of the SoC's backup register. Add a function to read the boot index value from the backup register. Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
Diffstat (limited to 'include/fwu.h')
-rw-r--r--include/fwu.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/fwu.h b/include/fwu.h
index 5391af99f51..73628c59f44 100644
--- a/include/fwu.h
+++ b/include/fwu.h
@@ -341,4 +341,16 @@ int fwu_plat_get_alt_num(struct udevice *dev, efi_guid_t *image_guid,
*
*/
int fwu_plat_get_update_index(uint *update_idx);
+
+/**
+ * fwu_plat_get_bootidx() - Get the value of the boot index
+ * @boot_idx: Boot index value
+ *
+ * Get the value of the bank(partition) from which the platform
+ * has booted. This value is passed to U-Boot from the earlier
+ * stage bootloader which loads and boots all the relevant
+ * firmware images
+ *
+ */
+void fwu_plat_get_bootidx(uint *boot_idx);
#endif /* _FWU_H_ */