aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
diff options
context:
space:
mode:
authorPatrick Delaunay <patrick.delaunay@foss.st.com>2022-03-28 19:25:28 +0200
committerPatrice Chotard <patrice.chotard@foss.st.com>2022-05-10 10:56:39 +0200
commite82ab4c8906fc2e1e42065e4207ff0c36f343553 (patch)
tree1dd4e7378248d69de68cb9579a0ffd00ec7456c8 /arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
parent72450b4b35d0e5be72439a5c2fbcf7b813d90a9a (diff)
stm32mp: stm32prog: add TEE support in stm32prog command
When OP-TEE is used, the SMC for BSEC management are not available and the PTA provisioning for OTP must be used. U-Boot opens the session to this PTA and use it for OTP access. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com>
Diffstat (limited to 'arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c')
-rw-r--r--arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
index e8acc302f9..82b702f93b 100644
--- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
+++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog_usb.c
@@ -181,7 +181,7 @@ int stm32prog_get_medium_size_virt(struct dfu_entity *dfu, u64 *size)
*size = CMD_SIZE;
break;
case PHASE_OTP:
- *size = OTP_SIZE;
+ *size = stm32prog_data->tee ? OTP_SIZE_TA : OTP_SIZE_SMC;
break;
case PHASE_PMIC:
*size = PMIC_SIZE;