summaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2021-04-02 14:05:17 +0200
committerPatrice Chotard <patrice.chotard@foss.st.com>2021-04-09 11:53:00 +0200
commit4fb7b3e10891ce8fc2d36e02e6d2f98df672e986 (patch)
treec00df71a6bb0979e32544cca411989a978f8dd91 /arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
parent0441b48570697195b924d83c0fd0dcb9f35e1865 (diff)
stm32mp: stm32prog: add FIP header support
Add support of TF-A FIP header in command stm32prog for all the boot partition and not only the STM32IMAGE. This patch is a preliminary patch to support FIP as second boot stage after TF-A BL2 when CONFIG_TFABOOT is activated for trusted boot chain. The FIP is archive binary loaded by TF-A BL2, which contains the secure OS = OP-TEE and the non secure firmware and device tree = U-Boot. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Diffstat (limited to 'arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h')
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
index 18af99c78bc..581b10d0ac9 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.h
@@ -37,8 +37,14 @@ enum stm32prog_link_t {
LINK_UNDEFINED,
};
+enum stm32prog_header_t {
+ HEADER_NONE,
+ HEADER_STM32IMAGE,
+ HEADER_FIP,
+};
+
struct image_header_s {
- bool present;
+ enum stm32prog_header_t type;
u32 image_checksum;
u32 image_length;
};
@@ -160,8 +166,8 @@ int stm32prog_pmic_read(struct stm32prog_data *data, u32 offset,
int stm32prog_pmic_start(struct stm32prog_data *data);
/* generic part*/
-u8 stm32prog_header_check(struct raw_header_s *raw_header,
- struct image_header_s *header);
+void stm32prog_header_check(struct raw_header_s *raw_header,
+ struct image_header_s *header);
int stm32prog_dfu_init(struct stm32prog_data *data);
void stm32prog_next_phase(struct stm32prog_data *data);
void stm32prog_do_reset(struct stm32prog_data *data);