lib: utils: Allow CLINT functions to be used for multiple CLINTs
authorAnup Patel <anup.patel@wdc.com>
Tue, 12 May 2020 13:08:31 +0000 (18:38 +0530)
committerAnup Patel <anup@brainfault.org>
Sat, 23 May 2020 05:06:43 +0000 (10:36 +0530)
commita9a97511851198559e75640a9e5e67f65695dc2e
tree3c7a01bfa30aab552fbb049f5fea25b8007a2d83
parentd30bb684481b6be642a0eaa9e7f0778d6519cc15
lib: utils: Allow CLINT functions to be used for multiple CLINTs

We extend CLINT cold init function to have a "struct clint_data *"
parameter pointing to CLINT details. This allows platforms to use
CLINT functions for multiple CLINT instances.

When multiple CLINTs are present, the platform can also provide
one of the CLINT as reference CLINT for other CLINTs. This will
help CLINTs to sync their time value with reference CLINT using
a time_delta computed in warm init function.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
include/sbi_utils/sys/clint.h
lib/utils/ipi/fdt_ipi_clint.c
lib/utils/sys/clint.c
lib/utils/timer/fdt_timer_clint.c
platform/fpga/ariane/platform.c
platform/fpga/openpiton/platform.c
platform/kendryte/k210/platform.c
platform/nuclei/ux600/platform.c
platform/sifive/fu540/platform.c
platform/template/platform.c
platform/thead/c910/platform.c