summaryrefslogtreecommitdiff
path: root/arch/nios2
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-03-04 08:43:05 -0700
committerTom Rini <trini@konsulko.com>2022-03-10 08:28:36 -0500
commit7fe32b3442f0d0e77a0768dcc1ee65fb352a080a (patch)
tree96a205669eeb9145d15eaec2f9bac5a53ea3c791 /arch/nios2
parent42fdcebf859f93139d58defd5abef44dedb9b17a (diff)
downloadu-boot-7fe32b3442f0d0e77a0768dcc1ee65fb352a080a.tar.gz
u-boot-7fe32b3442f0d0e77a0768dcc1ee65fb352a080a.tar.bz2
u-boot-7fe32b3442f0d0e77a0768dcc1ee65fb352a080a.zip
event: Convert arch_cpu_init_dm() to use events
Instead of a special function, send an event after driver model is inited and adjust the boards which use this function. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/nios2')
-rw-r--r--arch/nios2/cpu/cpu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/nios2/cpu/cpu.c b/arch/nios2/cpu/cpu.c
index b55c8fbc58..4dd9c10faa 100644
--- a/arch/nios2/cpu/cpu.c
+++ b/arch/nios2/cpu/cpu.c
@@ -10,6 +10,7 @@
#include <cpu_func.h>
#include <dm.h>
#include <errno.h>
+#include <event.h>
#include <init.h>
#include <irq_func.h>
#include <asm/cache.h>
@@ -63,7 +64,7 @@ static void copy_exception_trampoline(void)
}
#endif
-int arch_cpu_init_dm(void)
+static int nios_cpu_setup(void *ctx, struct event *event)
{
struct udevice *dev;
int ret;
@@ -79,6 +80,7 @@ int arch_cpu_init_dm(void)
return 0;
}
+EVENT_SPY(EVT_DM_POST_INIT, nios_cpu_setup);
static int altera_nios2_get_desc(const struct udevice *dev, char *buf,
int size)