summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2022-03-04 08:43:05 -0700
committerTom Rini <[email protected]>2022-03-10 08:28:36 -0500
commit7fe32b3442f0d0e77a0768dcc1ee65fb352a080a (patch)
tree96a205669eeb9145d15eaec2f9bac5a53ea3c791 /arch/mips
parent42fdcebf859f93139d58defd5abef44dedb9b17a (diff)
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 <[email protected]>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/Kconfig1
-rw-r--r--arch/mips/mach-pic32/cpu.c4
2 files changed, 4 insertions, 1 deletions
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 28234aa0bb6..06cae68ee57 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -130,6 +130,7 @@ config MACH_PIC32
config TARGET_BOSTON
bool "Support Boston"
select DM
+ imply DM_EVENT
select DM_SERIAL
select MIPS_CM
select SYS_CACHE_SHIFT_6
diff --git a/arch/mips/mach-pic32/cpu.c b/arch/mips/mach-pic32/cpu.c
index eac2fe5f8c9..de449e3c6a2 100644
--- a/arch/mips/mach-pic32/cpu.c
+++ b/arch/mips/mach-pic32/cpu.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <clk.h>
#include <dm.h>
+#include <event.h>
#include <init.h>
#include <malloc.h>
#include <asm/global_data.h>
@@ -95,12 +96,13 @@ static void prefetch_init(void)
}
/* arch specific CPU init after DM */
-int arch_cpu_init_dm(void)
+static int pic32_flash_prefetch(void *ctx, struct event *event)
{
/* flash prefetch */
prefetch_init();
return 0;
}
+EVENT_SPY(EVT_DM_POST_INIT, pic32_flash_prefetch);
/* Un-gate DDR2 modules (gated by default) */
static void ddr2_pmd_ungate(void)