u-boot/arch/arm/mach-imx/imx8m
Marek Vasut a5ee05cf71 ARM: imx: Pick correct eMMC boot partition from ROM log
In case the iMX8M boot from eMMC boot partition and the primary image
is corrupted, the BootROM is capable of starting a secondary image in
the other eMMC boot partition as a fallback.

However, the BootROM leaves the eMMC BOOT_PARTITION_ENABLE setting as
it was, i.e. pointing to the boot partition containing the corrupted
image, and the BootROM does not provide any indication that this sort
of fallback occured.

According to AN12853 i.MX ROMs Log Events, Rev. 0, May 2020, it is
possible to determine whether fallback event occurred by parsing the
ROM event log. In case ROM event ID 0x51 is present, fallback event
did occur.

This patch implements ROM event log parsing and search for event ID
0x51 for all iMX8M SoCs, and based on that corrects the eMMC boot
partition selection. This way, the SPL loads the remaining boot
components from the same eMMC boot partition from which it was
started, even in case of the fallback.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Faiz Abbas <faiz_abbas@ti.com>
Cc: Harald Seiler <hws@denx.de>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Ye Li <ye.li@nxp.com>
2021-07-10 18:12:42 +02:00
..
clock_imx8mm.c arm: imx: imx8mm: correct unrecognized fracpll frequency 2021-06-09 13:34:01 +02:00
clock_imx8mq.c iMX8M: Add support to enable CONFIG_IMX_HAB 2021-04-08 09:18:29 +02:00
clock_slice.c imx8m: update clock root and fix core_sel 2020-05-01 13:46:21 +02:00
imximage-8mm-lpddr4.cfg imx8m: add image cfg for i.MX8MM lpddr4 2019-10-08 16:36:36 +02:00
imximage-8mn-ddr4.cfg imx8m: add i.MX8MN ddr4 image cfg file 2019-11-05 10:27:18 +01:00
imximage-8mn-lpddr4.cfg ARM: imx: add i.MX8MN lpddr4 image cfg file 2021-01-23 14:01:59 +01:00
imximage-8mp-lpddr4.cfg imx: imx8m: add imximage-8mp-lpddr4.cfg 2020-01-08 13:20:09 +01:00
imximage.cfg imx: imx8m: introduce imximage cfg file 2019-01-01 14:12:18 +01:00
Kconfig board: phytec: imx8mp-phycore: Switch to binman 2021-07-10 16:53:34 +02:00
lowlevel_init.S imx8m: lowlevel_init: tune alignment 2021-01-23 11:30:31 +01:00
Makefile imx: imx8mp: add basic clock 2020-01-08 13:20:08 +01:00
soc.c ARM: imx: Pick correct eMMC boot partition from ROM log 2021-07-10 18:12:42 +02:00