]> git.baikalelectronics.ru Git - uboot.git/commit
arm: stm32mp1: force boot_device variable for invalid TAMP register value
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Thu, 8 Jul 2021 08:53:56 +0000 (10:53 +0200)
committerPatrick Delaunay <patrick.delaunay@foss.st.com>
Tue, 27 Jul 2021 07:47:40 +0000 (09:47 +0200)
commit4f288f2d126c4f2b05bc0fb4a949fe422ae8387d
tree45e5aecf7cda7bef752422453ee7d1b4bb7a3535
parent27df76ceebaa1fc43846f0a911642f6db57180c9
arm: stm32mp1: force boot_device variable for invalid TAMP register value

When the TAMP register 20 have an invalid value (0x0 for example after
TAMPER error) the "boot_device" U-Boot env variable have no value and
no error is displayed in U-Boot log.

The STM32MP boot command bootcmd_stm32mp failed with strange trace:
  "Boot over !"

and the next command in bootcmd_stm32mp failed with few indication:
  if test ${boot_device} = serial || test ${boot_device} = usb;
then stm32prog ${boot_device} ${boot_instance};

As it is difficult to investigate, the current patch avoids this issue:
- change the debug message to error: "unexpected boot mode" is displayed
- display trace "Boot over invalid!" in bootcmd_stm32mp
- execute "run distro_bootcmd" to try all the possible target

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
arch/arm/mach-stm32mp/cpu.c