FWU: STM32MP1: Add support to read boot index from backup register
authorSughosh Ganu <sughosh.ganu@linaro.org>
Fri, 21 Oct 2022 12:46:00 +0000 (18:16 +0530)
committerTom Rini <trini@konsulko.com>
Mon, 31 Oct 2022 18:47:32 +0000 (14:47 -0400)
commit95b5a7de30f6c2f6c38ac4919442c7d8d6fb86ce
treeb4d6f06af81e5820699f62594f191c6da1eaaf5e
parent7d6e2c54b7dd057f50bf0116c9e803e214dbe74c
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>
arch/arm/mach-stm32mp/include/mach/stm32.h
board/st/stm32mp1/stm32mp1.c
include/fwu.h