[PATCH v1 3/4] arch: arm: mach-k3: am642_init: Probe ESM nodes
Christian Gmeiner
christian.gmeiner at gmail.com
Thu Feb 3 09:40:19 CET 2022
Hi
Some comments from my side.
> /*
> * This uninitialized global variable would normal end up in the .bss section,
> * but the .bss is cleared between writing and reading this variable, so move
> @@ -160,6 +173,9 @@ void board_init_f(ulong dummy)
> store_boot_info_from_rom();
>
> ctrl_mmr_unlock();
> + mcu_ctrl_mmr_unlock();
> +
> + enable_mcu_esm_reset();
>
> /* Init DM early */
> spl_early_init();
> @@ -194,6 +210,18 @@ void board_init_f(ulong dummy)
> /* Output System Firmware version info */
> k3_sysfw_print_ver();
>
> +#ifdef CONFIG_ESM_K3
Maybe use #if defined(CONFIG_ESM_K3)
> + /* Probe/configure ESM0 */
> + ret = uclass_get_device_by_name(UCLASS_MISC, "esm at 420000", &dev);
ret condinaly defined and could not compile for every configuration.
void board_init_f(ulong dummy)
{
#if defined(CONFIG_K3_LOAD_SYSFW) || defined(CONFIG_K3_AM64_DDRSS)
struct udevice *dev;
int ret;
#endif
> + if (ret)
> + printf("esm main init failed: %d\n", ret);
> +
> + /* Probe/configure MCUESM */
> + ret = uclass_get_device_by_name(UCLASS_MISC, "esm at 4100000", &dev);
> + if (ret)
> + printf("esm mcu init failed: %d\n", ret);
> +#endif
> +
> #if defined(CONFIG_K3_AM64_DDRSS)
> ret = uclass_get_device(UCLASS_RAM, 0, &dev);
> if (ret)
> --
> 2.17.1
>
--
greets
--
Christian Gmeiner, MSc
https://christian-gmeiner.info/privacypolicy
More information about the U-Boot
mailing list