aboutsummaryrefslogtreecommitdiff
path: root/platform/fpga
diff options
context:
space:
mode:
authorAlexandre Ghiti <alexandre.ghiti@canonical.com>2021-10-27 09:43:36 +0200
committerAnup Patel <anup@brainfault.org>2021-11-02 11:23:16 +0530
commitc891acca172dfc60719419e19338508a83d97931 (patch)
tree04658a01d122f0fbaf81b91adce26e738c812659 /platform/fpga
parent723aa88ff4cc44230cf871bda319905113003279 (diff)
include: sbi_utils: Introduce an helper to get fdt base address
This simply adds an helper to get fdt address which is more explicit than sbi_scratch_thishart_arg1_ptr. Signed-off-by: Alexandre Ghiti <alexandre.ghiti@canonical.com> Reviewed-by: Xiang W <wxjstz@126.com> Reviewed-by: Anup Patel <anup.patel@wdc.com>
Diffstat (limited to 'platform/fpga')
-rw-r--r--platform/fpga/ariane/platform.c3
-rw-r--r--platform/fpga/openpiton/platform.c4
2 files changed, 4 insertions, 3 deletions
diff --git a/platform/fpga/ariane/platform.c b/platform/fpga/ariane/platform.c
index 5acc446..c6f0ffd 100644
--- a/platform/fpga/ariane/platform.c
+++ b/platform/fpga/ariane/platform.c
@@ -11,6 +11,7 @@
#include <sbi/sbi_const.h>
#include <sbi/sbi_hart.h>
#include <sbi/sbi_platform.h>
+#include <sbi_utils/fdt/fdt_helper.h>
#include <sbi_utils/fdt/fdt_fixup.h>
#include <sbi_utils/ipi/aclint_mswi.h>
#include <sbi_utils/irqchip/plic.h>
@@ -76,7 +77,7 @@ static int ariane_final_init(bool cold_boot)
if (!cold_boot)
return 0;
- fdt = sbi_scratch_thishart_arg1_ptr();
+ fdt = fdt_get_address();
fdt_fixups(fdt);
return 0;
diff --git a/platform/fpga/openpiton/platform.c b/platform/fpga/openpiton/platform.c
index 924053e..59c6702 100644
--- a/platform/fpga/openpiton/platform.c
+++ b/platform/fpga/openpiton/platform.c
@@ -76,7 +76,7 @@ static int openpiton_early_init(bool cold_boot)
if (!cold_boot)
return 0;
- fdt = sbi_scratch_thishart_arg1_ptr();
+ fdt = fdt_get_address();
rc = fdt_parse_uart8250(fdt, &uart_data, "ns16550");
if (!rc)
@@ -112,7 +112,7 @@ static int openpiton_final_init(bool cold_boot)
if (!cold_boot)
return 0;
- fdt = sbi_scratch_thishart_arg1_ptr();
+ fdt = fdt_get_address();
fdt_fixups(fdt);
return 0;