From f3a60850923bb96083b58b56455945e4ccaa77bc Mon Sep 17 00:00:00 2001 From: Gregor Haas Date: Thu, 25 Jan 2024 16:51:25 -0800 Subject: [PATCH] device sharing for cva6 and unmatched --- sm/plat/fpga/ariane/platform.c | 5 ++--- sm/plat/hifive/unmatched/unmatched.c | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sm/plat/fpga/ariane/platform.c b/sm/plat/fpga/ariane/platform.c index eda5b2f2c..b43ff25e8 100644 --- a/sm/plat/fpga/ariane/platform.c +++ b/sm/plat/fpga/ariane/platform.c @@ -73,12 +73,11 @@ static int ariane_early_init(bool cold_boot) */ static int ariane_final_init(bool cold_boot) { - void *fdt; - sm_init(cold_boot); + void *fdt = fdt_get_address(); + sm_init(cold_boot, fdt); if (!cold_boot) return 0; - fdt = fdt_get_address(); fdt_fixups(fdt); return 0; diff --git a/sm/plat/hifive/unmatched/unmatched.c b/sm/plat/hifive/unmatched/unmatched.c index c5372228a..e89b38752 100644 --- a/sm/plat/hifive/unmatched/unmatched.c +++ b/sm/plat/hifive/unmatched/unmatched.c @@ -2,7 +2,7 @@ #include "sm.h" static int unmatched_final_init(bool cold_boot, const struct fdt_match *match) { - sm_init(cold_boot); + sm_init(cold_boot, fdt_get_address()); return sifive_fu740_final_init(cold_boot, match); }