diff options
Diffstat (limited to 'include/sbi_utils/fdt/fdt_helper.h')
-rw-r--r-- | include/sbi_utils/fdt/fdt_helper.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sbi_utils/fdt/fdt_helper.h b/include/sbi_utils/fdt/fdt_helper.h index 5cb7340..24fee7a 100644 --- a/include/sbi_utils/fdt/fdt_helper.h +++ b/include/sbi_utils/fdt/fdt_helper.h @@ -11,6 +11,7 @@ #define __FDT_HELPER_H__ #include <sbi/sbi_types.h> +#include <sbi/sbi_scratch.h> struct fdt_match { const char *compatible; @@ -81,4 +82,9 @@ int fdt_parse_aclint_node(void *fdt, int nodeoffset, bool for_timer, int fdt_parse_compat_addr(void *fdt, uint64_t *addr, const char *compatible); +static inline void *fdt_get_address(void) +{ + return sbi_scratch_thishart_arg1_ptr(); +} + #endif /* __FDT_HELPER_H__ */ |