diff options
Diffstat (limited to 'platform/kendryte/k210/platform.c')
-rw-r--r-- | platform/kendryte/k210/platform.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/platform/kendryte/k210/platform.c b/platform/kendryte/k210/platform.c index db2186a..ef0f18f 100644 --- a/platform/kendryte/k210/platform.c +++ b/platform/kendryte/k210/platform.c @@ -22,6 +22,13 @@ static struct plic_data plic = { .num_src = K210_PLIC_NUM_SOURCES, }; +static struct clint_data clint = { + .addr = K210_CLINT_BASE_ADDR, + .first_hartid = 0, + .hart_count = K210_HART_COUNT, + .has_64bit_mmio = TRUE, +}; + static u32 k210_get_clk_freq(void) { u32 clksel0, pll0; @@ -76,8 +83,7 @@ static int k210_ipi_init(bool cold_boot) int rc; if (cold_boot) { - rc = clint_cold_ipi_init(K210_CLINT_BASE_ADDR, - K210_HART_COUNT); + rc = clint_cold_ipi_init(&clint); if (rc) return rc; } @@ -90,8 +96,7 @@ static int k210_timer_init(bool cold_boot) int rc; if (cold_boot) { - rc = clint_cold_timer_init(K210_CLINT_BASE_ADDR, - K210_HART_COUNT, TRUE); + rc = clint_cold_timer_init(&clint, NULL); if (rc) return rc; } |