From c8683c57f62c00e84ea66a5354a29ffcfec2a9eb Mon Sep 17 00:00:00 2001 From: Yu Chien Peter Lin Date: Fri, 14 Oct 2022 08:32:51 +0800 Subject: [PATCH] platform: andes/ae350: Add AE350 domain support Add domains_init platform hook for Andes AE350, users can add domain description in device tree and select FDT domain support in Kconfig to achieve system-level partitioning. Signed-off-by: Yu Chien Peter Lin Reviewed-by: Leo Yu-Chi Liang Reviewed-by: Anup Patel --- platform/andes/ae350/platform.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/platform/andes/ae350/platform.c b/platform/andes/ae350/platform.c index 30e4606..d36d11e 100644 --- a/platform/andes/ae350/platform.c +++ b/platform/andes/ae350/platform.c @@ -19,13 +19,14 @@ #include #include #include -#include +#include #include +#include +#include #include #include #include #include -#include #include "platform.h" #include "cache.h" @@ -84,6 +85,7 @@ static int ae350_final_init(bool cold_boot) fdt = fdt_get_address(); fdt_fixups(fdt); + fdt_domain_fixup(fdt); return 0; } @@ -132,10 +134,17 @@ static int ae350_vendor_ext_provider(long extid, long funcid, return ret; } +static int ae350_domains_init(void) +{ + return fdt_domains_populate(fdt_get_address()); +} + /* Platform descriptor. */ const struct sbi_platform_operations platform_ops = { .final_init = ae350_final_init, + .domains_init = ae350_domains_init, + .console_init = fdt_serial_init, .irqchip_init = fdt_irqchip_init, -- 2.7.4