summaryrefslogtreecommitdiff
path: root/arch/mips/mach-pic32/cpu.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-08-21 21:17:01 -0600
committerTom Rini <trini@konsulko.com>2023-08-31 13:16:55 -0400
commit91caa3bb89b112a1421ee2ee3661baf67c64bab9 (patch)
treef70b4d2452f8ca45025916cd85f0d1af684902bb /arch/mips/mach-pic32/cpu.c
parent6a32bfae61652f9dae621410ca6e094f374a1f11 (diff)
event: Use an event to replace last_stage_init()
Add a new event which handles this function. Convert existing use of the function to use the new event instead. Make sure that EVENT is enabled by affected boards, by selecting it from the LAST_STAGE_INIT option. For x86, enable it by default since all boards need it. For controlcenterdc, inline the get_tpm() function and make sure the event is not built in SPL. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'arch/mips/mach-pic32/cpu.c')
-rw-r--r--arch/mips/mach-pic32/cpu.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/mips/mach-pic32/cpu.c b/arch/mips/mach-pic32/cpu.c
index 785a87b618b..7ed306e045e 100644
--- a/arch/mips/mach-pic32/cpu.c
+++ b/arch/mips/mach-pic32/cpu.c
@@ -57,7 +57,7 @@ static ulong clk_get_cpu_rate(void)
}
/* initialize prefetch module related to cpu_clk */
-static void prefetch_init(void)
+static int prefetch_init(void)
{
struct pic32_reg_atomic *regs;
const void __iomem *base;
@@ -93,6 +93,8 @@ static void prefetch_init(void)
/* Enable prefetch for all */
writel(0x30, &regs->set);
iounmap(regs);
+
+ return 0;
}
/* arch-specific CPU init after DM: flash prefetch */