diff --git a/soc/andestech/ae350/pma.c b/soc/andestech/ae350/pma.c index d880e713097..326bdf372b9 100644 --- a/soc/andestech/ae350/pma.c +++ b/soc/andestech/ae350/pma.c @@ -194,7 +194,7 @@ void pma_init_per_core(void) #endif /* CONFIG_NOCACHE_MEMORY */ } -void soc_early_init_hook(void) +void pma_init(void) { unsigned long mmsc_cfg; diff --git a/soc/andestech/ae350/pma.h b/soc/andestech/ae350/pma.h index 9f6db1c655c..459db7c98d9 100644 --- a/soc/andestech/ae350/pma.h +++ b/soc/andestech/ae350/pma.h @@ -13,3 +13,6 @@ * (e.g. uncacheable) affects all CPUs. */ void pma_init_per_core(void); + +/* Initialize PMA */ +void pma_init(void); diff --git a/soc/andestech/ae350/soc.c b/soc/andestech/ae350/soc.c index 2decfe40826..852da6d8113 100644 --- a/soc/andestech/ae350/soc.c +++ b/soc/andestech/ae350/soc.c @@ -14,3 +14,12 @@ void soc_per_core_init_hook(void) #endif /* SOC_ANDES_V5_PMA */ } #endif /* CONFIG_SOC_PER_CORE_INIT_HOOK */ + +#ifdef CONFIG_SOC_EARLY_INIT_HOOK +void soc_early_init_hook(void) +{ +#ifdef CONFIG_SOC_ANDES_V5_PMA + pma_init(); +#endif /* CONFIG_SOC_ANDES_V5_PMA */ +} +#endif /* CONFIG_SOC_EARLY_INIT_HOOK */