arm: imx: imx9: soc: Fix env location when booting from USB
authorJoão Paulo Gonçalves <joao.goncalves@toradex.com>
Mon, 11 Aug 2025 12:57:50 +0000 (09:57 -0300)
committerFabio Estevam <festevam@gmail.com>
Sat, 23 Aug 2025 11:20:52 +0000 (08:20 -0300)
commita20dbbb0711ef144703848105dd0500b16ba7eae
tree4c63557ab1f9920f3a97bd48a1cec4f9a86c0772
parent94e690c44a03959c39f0f5a44a9b89c851af3b60
arm: imx: imx9: soc: Fix env location when booting from USB

On i.MX9 platforms, when booting from USB, the U-Boot environment is
always assumed to be in RAM. However, this causes the boot to hang when
`CONFIG_ENV_IS_NOWHERE` is not enabled. The boot also hangs even if the
environment is present in another storage media (for example, eMMC). Fix
the issue by correctly handling the U-Boot environment's location when
booting from USB. Also for i.MX95, set the environment location based on
the ENV config and not solely based on the boot device type.

Suggested-by: Frieder Schrempf <frieder.schrempf@kontron.de>
Signed-off-by: João Paulo Gonçalves <joao.goncalves@toradex.com>
arch/arm/mach-imx/imx9/scmi/soc.c
arch/arm/mach-imx/imx9/soc.c