aboutsummaryrefslogtreecommitdiff
path: root/lib/utils/serial/fdt_serial.c
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 /lib/utils/serial/fdt_serial.c
parent723aa88ff4cc44230cf871bda319905113003279 (diff)
downloadopensbi-c891acca172dfc60719419e19338508a83d97931.zip
opensbi-c891acca172dfc60719419e19338508a83d97931.tar.gz
opensbi-c891acca172dfc60719419e19338508a83d97931.tar.bz2
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 'lib/utils/serial/fdt_serial.c')
-rw-r--r--lib/utils/serial/fdt_serial.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/utils/serial/fdt_serial.c b/lib/utils/serial/fdt_serial.c
index 1d1eba8..cedda04 100644
--- a/lib/utils/serial/fdt_serial.c
+++ b/lib/utils/serial/fdt_serial.c
@@ -40,7 +40,7 @@ int fdt_serial_init(void)
struct fdt_serial *drv;
const struct fdt_match *match;
int pos, noff = -1, len, coff, rc;
- void *fdt = sbi_scratch_thishart_arg1_ptr();
+ void *fdt = fdt_get_address();
/* Find offset of node pointed to by stdout-path */
coff = fdt_path_offset(fdt, "/chosen");