imx9: scmi: fall back to NOWHERE env location
Subsystems (3)
PATCH 1/1 imx9: scmi: fall back to NOWHERE env location
From: Ye Li <[email protected]>
When no env storage is enabled, arch_env_get_location() returns ENVL_UNKNOWN which will cause boot hang since env_init() cannot find an environment driver for ENVL_UNKNOWN and returns -ENODEV.
Fall back to ENVL_NOWHERE whenever the selected boot medium has no enabled environment backend and CONFIG_ENV_IS_NOWHERE is available.
Signed-off-by Ye Li <[email protected]>
Signed-off-by Kjetil Aamodt <[email protected]>
--- arch/arm/mach-imx/imx9/scmi/soc.c | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/mach-imx/imx9/scmi/soc.c +3 -0
@@ -1358,6 +1358,9 @@ enum env_location arch_env_get_location(enum env_operation op, int prio)break ; } +if (env_loc ==ENVL_UNKNOWN &&IS_ENABLED (CONFIG_ENV_IS_NOWHERE )) + env_loc =ENVL_NOWHERE ; +return env_loc; }
Signature · 1 line
2.50.1
PATCH 1/1 imx9: scmi: Remove useless scmi protocol devices probe
From: Ye Li <[email protected]>
We have probed SCMI Agent device in imx9_probe_mu(), u-boot DM will auto probe scmi protocol devices when calling clock and pinctrl. So explicitly probing protocol devices is useless, remove the codes.
Signed-off-by Ye Li <[email protected]>
--- arch/arm/mach-imx/imx9/scmi/soc.c | 12 ------------ 1 file changed, 12 deletions(-)
arch/arm/mach-imx/imx9/scmi/soc.c +0 -12
@@ -1267,18 +1267,6 @@ int imx9_probe_mu(void)if (ret)return ret; - ret =uclass_get_device_by_name (UCLASS_CLK ,"protocol@14" , &dev); -if (ret) -return ret; - - ret =devm_scmi_of_get_channel (dev); -if (ret) -return ret; - - ret =uclass_get_device_by_name (UCLASS_PINCTRL ,"protocol@19" , &dev); -if (ret) -return ret; -#if defined(CONFIG_SPL_BUILD ) ret =uclass_get_device_by_name (UCLASS_MISC ,"mailbox@47530000" , &dev);#else
Signature · 1 line
2.50.1