From: Ye Li <[email protected]> Latest WDOG and GPIO init depends on DT ready in SPL. However, in common board_f framework, arch_cpu_init is called before DM init. So WDOG and GPIO init is not proper in arch_cpu_init. Move them to new function arch_init_post_dm_f which is called after DM init.
Signed-off-by: Ye Li <[email protected]> --- arch/arm/mach-imx/imx9/scmi/soc.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-imx/imx9/scmi/soc.c b/arch/arm/mach-imx/imx9/scmi/soc.c index 8bb3ce5cad9..00fb13ad65d 100644 --- a/arch/arm/mach-imx/imx9/scmi/soc.c +++ b/arch/arm/mach-imx/imx9/scmi/soc.c @@ -1077,6 +1077,12 @@ static int gpio_available(const char *nodes_path) } int arch_cpu_init(void) +{ + return 0; +} + +/* arch init which depends on DM init completion */ +static void arch_init_post_dm_f(void) { if (IS_ENABLED(CONFIG_SPL_BUILD)) { ofnode node; @@ -1102,8 +1108,6 @@ int arch_cpu_init(void) gpio_reset(GPIO7_BASE_ADDR); #endif } - - return 0; } int imx9_probe_mu(void) @@ -1146,6 +1150,8 @@ int imx9_probe_mu(void) set_cpu_info(&info); + arch_init_post_dm_f(); + return 0; } -- 2.50.1
