1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 08:42:12 +02:00

riscv: Clean up IPI initialization code

The previous IPI code initialized the device whenever the first call was
made to a riscv_*_ipi function. This made it difficult to determine when
the IPI device was initialized. This patch introduces a new function
riscv_init_ipi. It is called once during arch_cpu_init_dm. In SPL, it is
called in spl_invoke_opensbi. Before this point, no riscv_*_ipi functions
should be called.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Rick Chen <rick@andestech.com>
This commit is contained in:
Sean Anderson
2020-06-24 06:41:18 -04:00
committed by Andes
parent 9472630337
commit 40686c394e
7 changed files with 89 additions and 86 deletions

View File

@@ -79,6 +79,11 @@ void spl_invoke_opensbi(struct spl_image_info *spl_image)
invalidate_icache_all();
#ifdef CONFIG_SPL_SMP
/* Initialize the IPI before we use it */
ret = riscv_init_ipi();
if (ret)
hang();
/*
* Start OpenSBI on all secondary harts and wait for acknowledgment.
*