summaryrefslogtreecommitdiff
path: root/lib/utils/reset/fdt_reset_htif.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/utils/reset/fdt_reset_htif.c')
-rw-r--r--lib/utils/reset/fdt_reset_htif.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/utils/reset/fdt_reset_htif.c b/lib/utils/reset/fdt_reset_htif.c
index dd08660..2cc52dd 100644
--- a/lib/utils/reset/fdt_reset_htif.c
+++ b/lib/utils/reset/fdt_reset_htif.c
@@ -14,7 +14,17 @@
static int htif_reset_init(void *fdt, int nodeoff,
const struct fdt_match *match)
{
- return htif_system_reset_init();
+ bool custom = false;
+ uint64_t fromhost_addr = 0, tohost_addr = 0;
+
+ if (!fdt_get_node_addr_size(fdt, nodeoff, 0, &fromhost_addr, NULL)) {
+ custom = true;
+ tohost_addr = fromhost_addr + sizeof(uint64_t);
+ }
+
+ fdt_get_node_addr_size(fdt, nodeoff, 1, &tohost_addr, NULL);
+
+ return htif_system_reset_init(custom, fromhost_addr, tohost_addr);
}
static const struct fdt_match htif_reset_match[] = {